Commit Graph

67 Commits (986dc3f52c25d7909ea1e20452a6d15816f42a3a)

Author SHA1 Message Date
nutomic bd0e69b2bb Various things refactored (#95)
Remove unused derive macros

lemmy_rate_limit doesnt depend on lemmy_api_structs anymore

Dont use "pub extern crate"

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/95
4 years ago
Felix Ableitner 353e2e027a Move api structs and rate limit into separate workspaces 4 years ago
Felix Ableitner 5d64dfd4dc Remove wildcard imports (in particular super::*) 4 years ago
Felix Ableitner b15c406924 Refactor websocket to split it into multiple files 4 years ago
nutomic d4dccd17ae implement ActivitySender actor (#89)
Merge pull request 'Adding unique ap_ids. Fixes #1100' (#90) from unique_ap_ids into activity-sender

Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/90

Adding back in on_conflict.

Trying to add back in the on_conflict_do_nothing.

Trying to reduce delay time.

Removing createFakes.

Removing some unit tests.

Adding comment jest timeout.

Fixing tests again.

Fixing tests again.

Merge branch 'activity-sender' into unique_ap_ids_2

Replace actix client with reqwest to speed up federation tests

Trying to fix tests again.

Fixing unit tests.

Fixing some broken unit tests, not done yet.

Adding uniques.

Adding unique ap_ids. Fixes #1100

use proper sql functionality for upsert

added logging

in fetcher, replace post/comment::create with upsert

no need to do an actual update in post/comment::upsert

Merge branch 'main' into activity-sender

implement upsert for user/community

reuse http client

got it working

attempt to use background-jobs crate

rewrite with proper error handling and less boilerplate

remove do_send, dont return errors from activity_sender

WIP: implement ActivitySender actor

Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/89
4 years ago
Dessalines 2d5a50e80f
Fixing broken websocket sends. Removing WebSocketInfo (#1098) 4 years ago
nutomic 14f2d190e5 Implement context (#86)
Implement context

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/86
4 years ago
Dessalines 1711eb98b4
Removing some unecessary unwrap. Fixes #639 (#1078)
* Removing some unecessary unwrap. Fixes #639

* Changing some location_infos.

Co-authored-by: Felix Ableitner <me@nutomic.com>
4 years ago
Dessalines 8daeba450c
Removing unnecessary oper struct. Fixes #660 (#1077) 4 years ago
Dessalines 49bd28e2d4
Adding visual captchas for register and login. (#1027)
* Adding visual captchas for register and login.

* Adding audio wav file for Captcha using espeak.

* Lots of captcha fixes.

- Removed login captchas.
- Added settings to disable captchas, and change difficulty.
- Captchas can only be checked / used once, front end gives a new one on
  failure.
- Added front end button for regenerating captcha.
- Added a disabled / pause button audio playing.

* Some more fixes.
4 years ago
Dessalines 2eac037408 Adding post delete, remove, lock, and sticky. 4 years ago
Dessalines fd96dfdb5e Added comment delete, remove, read. 4 years ago
Dessalines 9bc6698f58 Added community delete and remove. 4 years ago
Dessalines a67f46bec5 EditUserMention changed to MarkUserMentionAsRead. 4 years ago
Dessalines 0a28ffb9c4 Private message delete and read extracted. 4 years ago
Riley a074564458
Federation async (#848)
* Asyncify more

* I guess these changed

* Clean PR a bit

* Convert more away from failure error

* config changes for testing federation

* It was DNS

So actix-web's client relies on TRust DNS Resolver to figure out
where to send data, but TRust DNS Resolver seems to not play nice
with docker, which expressed itself as not resolving the name to
an IP address _the first time_ when making a request. The fix was
literally to make the request again (which I limited to 3 times
total, and not exceeding the request timeout in total)

* Only retry for connecterror

Since TRust DNS Resolver was causing ConnectError::Timeout,
this change limits the retry to only this error, returning
immediately for any other error

* Use http sig norm 0.4.0-alpha for actix-web 3.0 support

* Blocking function, retry http requests

* cargo +nightly fmt

* Only create one pictrs dir

* Don't yarn build

* cargo +nightly fmt
4 years ago
Felix 9e61c3be94 Rework imports 4 years ago
Dessalines 6b58080067 Adding websocket blocking. 5 years ago
Dessalines 0d4679a37b Making websocket create community do register rate limit. 5 years ago
asonix 904ebf34a5 Guard CreateCommunity, represent impossible error with Infallible 5 years ago
asonix ac43b86b60 Change RateLimit to act as a middleware 5 years ago
Dessalines f300c67a4d Adding websocket notification system.
- HTTP and APUB clients can now send live updating messages to websocket
  clients
- Rate limiting now affects both HTTP and websockets
- Rate limiting / Websocket logic is now moved into the API Perform
  functions.
- TODO This broke getting current online users, but that will have to
  wait for the perform trait to be made async.
- Fixes #446
5 years ago
Dessalines bb287cbd07 Adding an admin settings page.
- Fixes #620
- Adding a UserListing component. Fixes #627
5 years ago
Dessalines 62ab68d317 Adding full logging. 5 years ago
Felix Ableitner ef6df1339f Proper error logging for websocket 5 years ago
Dessalines 9c8fe0379f Adding instant voting / vote animations. Fixes #526 5 years ago
Dessalines ecd10482a6 Add new comments views to main and community pages. Fixes #480 5 years ago
Dessalines 218653c52f Fixing rate limiting. 5 years ago
Dessalines 1369ad1fbc Fixing rate limit checking to only ping after a success. Fixes #516 5 years ago
Dessalines 96a7e99e57 Removing PostLikeResponse in favor of PostResponse. Consolidating comment and post_sends. 5 years ago
Dessalines cda1e6e741 Fixing issue with multiple notifications. 5 years ago
Dessalines 8ec104cb76 Mostly done eliminating recurring fetches. 5 years ago
Dessalines 8036474dda Starting to work on user message scope. 5 years ago
Dessalines aa5a911edc Fixing front end error messages. Fixes #462 5 years ago
Dessalines ac1d5f2b86 Done merging http-api and private_message 5 years ago
Dessalines 253bc3e0af Adding private messaging, and matrix user ids.
- Fixes #244
5 years ago
Felix 4b029865d7 Use generics to reduce code duplication in websocket 5 years ago
Felix 05ee5a8b60 simplify json serialization code 5 years ago
Felix 9121d74194 small fix 5 years ago
Felix f1035dacc2 working! 5 years ago
Dessalines 81c6d276d5 Fix issue with adding multiple instances of chatserver. 5 years ago
Dessalines dff8b947bb Trying to add r2d2 connection pooling to websockets. 5 years ago
Felix d8c84e2541 Upgrade actix to 2.0 (fixes #392) 5 years ago
Felix Ableitner d08e09fbdc Apply changes suggested by cargo clippy (fixes #395) 5 years ago
Felix Ableitner cf3ae15ee9 Implement config (fixes #351) 5 years ago
Lyra 9fc8aacc2d Add default options for all parameters and move them out of the constructor. Rename structure to PostQueryBuilder 5 years ago
Lyra bff3183a27 Use a dedicated structure in order to search posts 5 years ago
Dessalines 9f35b33dc7 Halfway done with email, not fully working yet. 5 years ago
Dessalines 90ce1f1a3f Adding default sort / filter into user settings.
- Fixes #295
5 years ago
Dessalines 02dd9ac32a Adding username mentions / tagging from comments.
- Fixes #293
5 years ago