Commit graph

40 commits

Author SHA1 Message Date
Nutomic a2a594b763
Extract Activitypub logic into separate library (#2288)
* Create example for apub lib

* some rewriting of apub lib

* Add LocalInstance struct for apub lib to avoid using Lemmy Settings

* Move ActorType trait to lemmy_apub, because its not needed in library

* Use reqwest_retry instead of custom impl, dont specify timeout on every send()

* Some improvements to example

* Moved inbox handling to library

* bug fixes

* Move context and serde helpers into library

* wip: example changes

* Add lemmy_utils feature to build only LemmyError

* Rename to activitypub_federation

* Remove lemmy_utils dep from activitypub_federation using generic error type

* Finish activitypub example

* Cleanup and fix tests

* Reorganize library files

* Remove ApubObject.to_tombstone()

* Extract activitypub library into separate git repository
2022-06-02 16:33:41 +02:00
Dessalines eafb3869f2
Revert "Add pending, and change use specific API response for FollowCommunity…" (#2283) 2022-05-26 11:17:04 -04:00
Dessalines ed9b66541e Fixing API tests. 2022-05-20 16:15:14 +00:00
Nutomic 65cac21713
Fix verify_mod_action check for remote admin actions (#2190)
* Fix verify_mod_action check for remote admin actions

* fix federation test
2022-04-04 14:46:49 +00:00
Dessalines 500ca15893 Trying to fix api tests 2 2022-03-22 18:06:59 -04:00
Dessalines 5698dd7771 Trying to fix api tests 1 2022-03-22 15:50:47 -04:00
Nutomic dd865c5af5
Implement instance actor (#1798)
* Implement instance actor

* wip: make site bans federate

* finish implementation and unit tests for federated bans

* start adding api tests

* fix api test

* remve site from GetCommunityResponse

* only federate site bans originating from user's home instance

* dont expose site.private_key in api
2022-02-07 19:23:12 +00:00
Dessalines d9ecabee87
Dont blank out post or community info. Fixes #1813 (#1841)
* Dont blank out post or community info. Fixes #1813

* Fix federation tests

* Only blank out info for non-logged in users.

* Remove pointless trait.

* Blank the community if deleted for post

* Fix hook

* Fixing again

* Fixing again

* Fixing again
2021-10-27 13:34:18 +00:00
Nutomic 149a4e0de8
Breaking apub changes (#1859)
* Remove CommentInReplyToMigration

* Remove compat for RemovePostCommentOrCommunity

* Remove PublicUrlMigration

* Change type of pm to ChatMessage from Pleroma, make pm.to array

* Use person.summary instead of person.content for pleroma compat

* Also change group.content to summary

* Rewrite apub object test json to serve as nice examples

* Also add test case for parsing pleroma private message
2021-10-22 12:21:26 -04:00
Nutomic 18badcfdb4
Federate reports (#1830)
* Federate reports

* add federation test cases for reports
2021-10-15 10:37:33 -04:00
Dessalines 2402515fcc
Dont allow posts to deleted / removed communities. Fixes #1827 (#1828)
* Dont allow posts to deleted / removed communities. Fixes #1827

* Fixing couldnt find community error.

* Adding check in createorupdate post and comment.

* make sure post wasn't deleted or removed.

* Adding a post not deleted or removed check to creatorupdatecomment.

* Using pub(crate)
2021-10-14 16:33:19 +00:00
Nutomic 527eefbe92
Rewrite fetcher (#1792)
* Use new fetcher implementation for post/comment

* rewrite person fetch to use new fetcher

* rewrite community to use new fetcher

* rename new_fetcher to dereference_object_id

* make ObjectId a newtype

* handle deletion in new fetcher

* rewrite apub object search to be generic

* move upsert() method out of ApubObject trait

* simplify ObjectId::new (and fix clippy)
2021-09-25 11:44:52 -04:00
Dessalines c23e7cc20d
Fixing ResolveObject API and unit tests (#1713) 2021-08-23 17:25:39 +02:00
Dessalines d85f0d087e
Blank out extra info for deleted or removed content. Fixes #1679 (#1680) 2021-07-30 18:44:15 +00: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
Felix Ableitner 4f54108a9c Merge branch 'main' into federated-moderation 2021-03-19 17:11:34 +01:00
Felix Ableitner 4f7dca7c2b Fix three federation test cases 2021-03-18 17:02:15 +01:00
Dessalines 434fb53dd1 Trying to fix API tests. 2021-03-12 14:09:03 -05:00
Dessalines d767dd998e Merge branch 'drone-io-dess' into move_views_to_diesel_drone 2020-12-20 21:48:29 -05:00
Dessalines 5af8257e19 Changing unit tests to api v2. 2020-12-20 16:16:57 -05:00
Dessalines 9d0709dfe8 Trying again. 2020-12-17 21:55:15 -05:00
Dessalines 2e5297e337 Trying again. 2020-12-17 21:36:59 -05:00
Dessalines 5c266302c5 Adding unfollows. 2020-12-17 21:10:20 -05:00
Dessalines caaf6b178b Trying again. 2020-12-17 15:35:28 -05:00
Dessalines 583808d5e7 Trying again. 2020-12-17 14:59:53 -05:00
Dessalines 5768a4eda7 Trying again. 2020-12-17 14:36:22 -05:00
Dessalines 4997d4b0b5 Trying again. 2020-12-17 14:23:15 -05:00
Dessalines 179709cc09 Fixing drone tests. 2020-12-17 14:01:33 -05:00
Dessalines ccd26bfcd7 Trying to fix post test again. 2020-12-12 10:45:14 -05:00
Dessalines f6ba6d5590 Trying to fix post test again. 2020-12-12 10:28:28 -05:00
Dessalines dfe17662df Trying to fix post test again. 2020-12-12 09:39:41 -05:00
Dessalines 28c217eb66 Trying to fix post test again. 2020-12-11 23:20:18 -05:00
Dessalines d594005d49 Trying to fix post test again. 2020-12-11 20:20:14 -05:00
Dessalines 4410d2e44d Trying to fix post test again. 2020-12-11 19:59:45 -05:00
Dessalines 5dff60adc5 Trying to fix post test again. 2020-12-11 16:26:44 -05:00
Dessalines 9e5824df85 Trying to fix post test. 2020-12-11 15:24:28 -05:00
Dessalines ff8acfb8de Adding some more integration tests for locked posts and bans. 2020-11-10 10:53:35 -06:00
Dessalines 6c8a5723f8 Trying to add some long delays. 2020-10-01 08:32:01 -05:00
Felix Ableitner cdb02c992c Add tests for avatars, banners and more 2020-09-17 17:41:51 +02:00
Dessalines 5c6258390c
Isomorphic docker (#1124)
* Adding a way to GetComments for a community given its name only.

* Adding getcomments to api docs.

* A first pass at locally working isomorphic integration.

* Testing out cargo-husky.

* Testing a fail hook.

* Revert "Testing a fail hook."

This reverts commit 0941cf1736.

* Moving server to top level, now that UI is gone.

* Running cargo fmt using old way.

* Adding nginx, fixing up docker-compose files, fixing docs.

* Trying to re-add API tests.

* Fixing prod dockerfile.

* Redoing nightly fmt

* Trying to fix private message api test.

* Adding CommunityJoin, PostJoin instead of joins from GetComments, etc.

- Fixes #1122

* Fixing fmt.

* Fixing up docs.

* Removing translations.

* Adding apps / clients to readme.

* Fixing main image.

* Using new lemmy-isomorphic-ui with better javascript disabled.

* Try to fix image uploads in federation test

* Revert "Try to fix image uploads in federation test"

This reverts commit a2ddf2a90b.

* Fix post url federation

* Adding some more tests, some still broken.

* Don't need gitattributes anymore.

* Update local federation test setup

* Fixing tests.

* Fixing travis build.

* Fixing travis build, again.

* Changing lemmy-isomorphic-ui to lemmy-ui

* Error in travis build again.

Co-authored-by: Felix Ableitner <me@nutomic.com>
2020-09-15 15:26:47 -04:00
Renamed from ui/src/api_tests/post.spec.ts (Browse further)