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
Merge branch 'main' into undo-dislike
Implement undo<dislike> for activitypub
Fix some TODOs in activitypub code
Add post_read back in, do some cleanup
Add some delete functions back in
Merge branch 'main' into remove-dead-code
Replace body of unused db functions with unimplemented!()
Remove dead code
Remove remaining usages of unwrap() from activitypub code
Remove most usage of Option::unwrap() from activitypub code
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/83
Merge branch 'main' into more-inbox-permissions
Move check_community_ban() into helper function
Move slur check into helper functions
Move Claims::decode and site ban check into helper function
Note: this changes behaviour in that site ban is checked in more
places now. we could easily add a boolean parameter
check_for_site_ban to get the previous behaviour back
Rewrite user_inbox and community_inbox in the same way as shared_inbox
Add check against instance allowlist etc in shared_inbox
Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/76
- This adds a form_id to CreateComment, EditComment, and CommentResponse
- This is so any front end clients can add a randomly generated string,
and know which comment they submitted, is the one they're getting
back.
- This gets rid of all the weird complicated logic in handleFinished(),
and should stop the comment forms getting cleared once and for all.
* secure the `EditPost` API endpoint
* Check user is moderator in BanFromCommunity
* secure the `EditComment` API endpoint
* pass orig `read` prob when not explicitly updating it.
* Block random users from adding mods.
* use cleaner logic from `EditPost`
* prevent editing a community by a mod from transfering ownership to them
* secure `read` action in `EditPrivateMessage`
* Add check in UserMention
* only let the indended recipient mark as read
* simplify booleans to satisfy clippy
* requested changes + cargo +nightly fmt
* fix to pass federation tests for deleting comments and posts
Co-authored-by: chiminh <chiminh.tutanota.com>
Co-authored-by: Hex Bear <buildadangtrain@protonmail.com>
More fixes
- fixed docker builds
- fixed mentions regex test
- fixed DATABASE_URL stuff
- change schema path in diesel.toml
Address review comments
- add jsonb column back into activity table
- remove authors field from cargo.toml
- adjust LEMMY_DATABASE_URL env var usage
- rename all occurences of LEMMY_DATABASE_URL to DATABASE_URL
Decouple utils and db
Split code into cargo workspaces
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/67
* 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
- Advanced code migrations now disable then re-enable triggers.
Brings run time down to < 15 seconds, no need to thread them.
- Changing ap_ids and actor_ids in migrations to a fake url,
so it doesn't break XsdAnyUri in activitystreams.
- 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