Commit graph

85 commits

Author SHA1 Message Date
Felix Ableitner
c1db86925f Merge apub, apub_receive crates (fixes #1621) 2021-07-17 18:20:44 +02:00
Nutomic
c7de1fcf24
Apub inbox rewrite (#1652)
* start to implement apub inbox routing lib

* got something that almost works

* it compiles!

* implemented some more

* move library code to separate crate (most of it)

* convert private message handlers

* convert all comment receivers (except undo comment)

* convert post receiver

* add verify trait

* convert community receivers

* add cc field for all activities which i forgot before

* convert inbox functions, add missing checks

* convert undo like/dislike receivers

* convert undo_delete and undo_remove receivers

* move block/unblock activities

* convert remaining activity receivers

* reimplement http signature verification and other checks

* also use actor type for routing, VerifyActivity and SendActivity traits

* cleanup and restructure apub_receive code

* wip: try to fix activity routing

* implement a (very bad) derive macro for activityhandler

* working activity routing!

* rework pm verify(), fix tests and confirm manually

also remove inbox username check which was broken

* rework following verify(), fix tests and test manually

* fix post/comment create/update, rework voting

* Rewrite remove/delete post/comment, fix tests, test manually

* Rework and fix (un)block user, announce, update post

* some code cleanup

* rework delete/remove activity receivers (still quite messy)

* rewrite, test and fix add/remove mod, update community handlers

* add docs for ActivityHandler derive macro

* dont try to compile macro comments
2021-07-17 12:08:46 -04:00
Dessalines
9840f5c1c1
Upgrading deps, running clippy fix on nightly 1.55.0 (#1638)
* Upgrading deps, running clippy fix on nightly 1.55.0

* Running clippy --fix

* Trying to fix transform

* Trying to fix another transform

* Upgrading http-signature-normalization-actix

* Fix app_data

* Fix pictrs uploading

* Fix unwrap
2021-07-06 13:26:46 +00:00
Dessalines
f54209c451
Running clippy --fix (#1647) 2021-07-05 16:07:26 +00:00
Dessalines
12d50e42b4
Change join.lemmy.ml to join-lemmy.org (#1628) 2021-06-07 21:10:47 +00:00
Dessalines
f8cd6fd445 Making more fields optional in the API.
- Fixes #1569
2021-04-23 02:30:13 -04:00
Nutomic
efee2062dd
Mark accounts as bot nutomic (#1565)
* Mark account as bot. Fixes #1357

* Fix clippy

* Federate bot status using actor `type` field

* fix clippy

Co-authored-by: Dessalines <tyhou13@gmx.com>
2021-04-21 17:41:14 -04:00
Dessalines
9dc5605663
Merge pull request #1588 from LemmyNet/improved-logging
Improved logging
2021-04-21 10:34:47 -04:00
Nutomic
8bb3ba4a16
Add option to disable strict allowlist (fixes #1486) (#1581)
* Add option to disable strict allowlist (fixes #1486)

* adjust docs
2021-04-21 09:36:07 -04:00
Felix Ableitner
78eee7dc9e Improved logging 2021-04-21 14:45:10 +02:00
Felix Ableitner
c572dc0cc6 Remote mods can update/delete/undelete communities 2021-04-13 15:19:17 +02:00
Nutomic
aa79c5131f
Implement federated bans (fixes #1298) (#1553)
* Implement federated bans (fixes #1298)

* mod actions should always be federated to affected user, in addition to followers

* Make Undo/Block work for remote mods

* clippy fix

* fix federation test

* vscodium doesnt auto-save changes...
2021-04-09 11:01:26 -04:00
Dessalines
c3d64f996e
Removing community.creator column. Fixes #1504 (#1541)
* Removing community.creator column. Fixes #1504

* Fixing unit tests.

* Fixing federation tests.
2021-04-08 11:29:08 +00:00
Dessalines
bf7558830f Changing preferred to display name. Fixes #1211 2021-04-01 13:57:45 -04:00
Felix Ableitner
722cdb78ba Split lemmy_apub crate into two parts apub and apub_receive 2021-03-30 22:29:16 +02:00
Dessalines
4c8f2e976e Merge remote-tracking branch 'yerba/split-api-crate' into test_merge_api_crates_reorg 2021-03-29 16:24:50 -04:00
Felix Ableitner
01fc1228d5 Fix API and clippy warnings 2021-03-29 20:55:08 +02:00
Felix Ableitner
249fcc5066 Split api crate into api_structs and api 2021-03-25 20:19:40 +01:00
Felix Ableitner
34bdf4c7c5 Federate Matrix ID (fixes #1438) 2021-03-24 17:56:13 +01:00
Dessalines
3ca2453fc6 Merge branch 'main' into move_matrix_and_admin_to_person 2021-03-24 11:51:34 -04:00
Dessalines
8a10a9079f Merge remote-tracking branch 'yerba/federated-moderation' 2021-03-24 11:48:02 -04:00
Felix Ableitner
c7524d924b Fix federation tests 2021-03-24 16:33:04 +01:00
Dessalines
e4ead96d3a Merge branch 'main' into move_matrix_and_admin_to_person 2021-03-22 10:29:10 -04:00
Dessalines
eb45bf2d0a Moving admin to person table. Fixes #1515 2021-03-22 10:28:00 -04:00
Felix Ableitner
d6bd072ea1 Make federation compatible with Lemmy v0.9.9 2021-03-22 15:08:06 +01:00
Felix Ableitner
a5a0d90349 Address review comments 2021-03-22 13:52:00 +01:00
Felix Ableitner
459b95bc7e Make previous commit compile 2021-03-22 13:11:32 +01:00
Grishka
115b986edc uh 2021-03-21 04:03:53 +03:00
Grishka
c14a505456 Fix JSON-LD contexts 2021-03-21 04:00:32 +03:00
Dessalines
c884510173 Creating default DB forms. Fixes #1511 2021-03-20 16:59:07 -04:00
Dessalines
1745b64ceb Moving matrix_user_id to person table. #1438 2021-03-20 15:21:51 -04:00
Felix Ableitner
4f54108a9c Merge branch 'main' into federated-moderation 2021-03-19 17:11:34 +01:00
Dessalines
9930c7288a Merge branch 'split_user_table' into strictly_type_db_ids 2021-03-18 16:30:42 -04:00
Dessalines
8d9fab0389 Merge branch 'main' into split_user_table 2021-03-18 16:30:29 -04:00
Dessalines
c3efb9f7cf Strictly typing DB id fields. Fixes #1498 2021-03-18 16:25:21 -04:00
Felix Ableitner
4f7dca7c2b Fix three federation test cases 2021-03-18 17:02:15 +01:00
Felix Ableitner
b3a5b4eb82 Refactor activitypub code 2021-03-17 18:12:37 +01:00
Felix Ableitner
71067a8cb5 For FromApub trait, use is_mod_action: bool instead 2021-03-16 18:26:19 +01:00
Felix Ableitner
be00f63fb2 Allow remot moderators to do Remove/Post and Remove/Comment 2021-03-16 18:06:59 +01:00
Felix Ableitner
621355b6ef Insert announced activities into DB for fetching (fixes #1494) 2021-03-15 13:58:54 +01:00
Dessalines
5998c83b2a Only sending private message if its a local user. 2021-03-12 15:18:03 -05:00
Felix Ableitner
de14636e10 Fix code to allow sticky/lock from remote moderators 2021-03-12 16:46:36 +01:00
Felix Ableitner
de39d57592 WIP: check that modifications are made by same user, add docs 2021-03-12 14:47:55 +01:00
Felix Ableitner
50559de6d2 Add check so only mods can change stickied/locked state of posts 2021-03-11 18:11:59 +01:00
Felix Ableitner
803aad3b3e Add check so only author or mods can edit posts/comments 2021-03-11 17:50:47 +01:00
Felix Ableitner
a2698dea92 Allow for remote mods to remove posts/comments 2021-03-11 17:21:45 +01:00
Dessalines
9cb4dad4b4 A first pass. 2021-03-10 23:43:11 -05:00
Dessalines
ddf4a667b1 ~80% done 2021-03-10 17:33:55 -05:00
Felix Ableitner
3ffae1f5b8 Allow adding remote users as community mods (ref #1061) 2021-03-09 18:14:15 +01:00
Felix Ableitner
dcf40db225 Update activitystreams to 0.7.0-alpha.11 2021-03-09 18:14:15 +01:00