Commit Graph

45 Commits (d39bc14c43d9190c52779128f696c8ee27fb63e4)

Author SHA1 Message Date
Nutomic a0fed24cee
When announcing incoming activities, keep extra fields (#2550) 2 years ago
Nutomic e3bb43542c
Mobilizon federation (#2544)
* Mobilizon federation

* Also accept document attachments from mobilizon
2 years ago
Nutomic aaaea2006c
Federate votes as private (#2501) 2 years ago
Nutomic 2ef0f8f5f8
implement language tags for site/community in db and api (#2434)
* implement language tags for site/community in db and api

* add api checks for valid languages

* during db migration, update existing users, sites, communities to have all languages enabled

* init new users/communities with site languages (not all languages)

* federate site/community languages

* fix tests

* when updating site languages, limit community languages to this subset

also, when making a new post and subset of user lang, community lang
contains only one item, use that as post lang

* add tests for actor_language db functions

* include language list in siteview/communityview

* Fix some of the review comments

* Some more review changes

* Add todo about boxed query

* Add default_post_language to GetCommunityResponse
2 years ago
Felix Ableitner 3d0d8796ad Add language tags for comments 2 years ago
Nutomic e4a49b6eab
Tag posts and comments with language (fixes #440) (#2269)
* Tag posts and comments with language (fixes #440)

* Untangle PostView tests

* Implement test for PostView language query

* Store languages directly in database

* finish moving languages into db, it compiles

* update post_view

* serde skip Language.id field

* add local_user_language table, other changes suggested in review

* add code for local_user_discussion_language_view

* Remove unnecessary clones in db view converteres

* Fixing up some table and join issues.

* Clearing the current languages.

* Fix formatting.

* update user languages in single transaction

* proper test for user language queries

* Some fixes for all / missing user languages. (#2404)

* Some fixes for all / missing user languages.

* Adding back in transaction.

* fix test

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2 years ago
Dessalines 870abf8442
Adding distinguish comment. Fixes #2002 (#2391)
* Adding distinguish comment. Fixes #2002

* Adding lemmy:distinguished
2 years ago
vpzomtrrfrt 08a797c986
Accept Image objects in attachments (#2394) 2 years ago
Nutomic becb8b4f66
Update apub examples to remove `to` field (ref #2380) (#2382) 2 years ago
Nutomic a85334c675
Handle Like, Undo/Like activities from Mastodon, add tests (fixes #2378) (#2380) 2 years ago
Dessalines 67a34adf4b
Revert "Use correct url for activitystreams protocol context (#2326)" (#2351)
This reverts commit dc35ab9c2b.
2 years ago
Nutomic dc35ab9c2b
Use correct url for activitystreams protocol context (#2326) 2 years ago
trwnh 5b7376512f
Fix: Use correctly parseable JSON-LD context (#2299)
* Fix: Use correctly parseable JSON-LD context

* Changed: Better ordering for context document

alphabetized properties

* Changed: Use xsd types instead of schema.org types

* Changed: use simple namespacing
2 years ago
Nutomic fcaf7a084c
Upgrade activitypub_federation to 0.2.0, add setting federation.debug (#2300) 2 years ago
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
2 years ago
Nutomic 7b86441bab
Federate with Peertube (#2244) 2 years ago
Nutomic 7058cfa1cf
Implement restricted community (only mods can post) (fixes #187) (#2235)
* Implement restricted community (only mods can post) (fixes #187)

* review fixes

* fix tests
2 years ago
Nutomic c718882479
Accept comments with hashtags from Friendica (#2236) 2 years ago
Nutomic bbd739af9b
Change Person, Instance types (#2200) 2 years ago
Nutomic 8337eaefdd
Federate user account deletion (fixes #1284) (#2199) 2 years ago
Nutomic bfae246734
Migrate towards using page.attachment field for url (ref #2144) (#2182) 2 years ago
Nutomic 610120067c
Add test files for Friendica federation (fixes #2144) (#2167) 2 years ago
Nutomic dfb0938738
GNU social compatibility (#2100)
* Use SourceCompat everywhere (better compat with other software)

* Name field should not be mandatory in Group

* also check page.cc field for community id

* add gnu social tests

* better to use option<sourcecompat>

* update gnu social tests, marked vote as "unlisted"
2 years ago
Nutomic 762b85b27e
Reorganize federation tests (#2092)
* Reorganize apub protocol tests

* Reorder apub protocol struct members to clarify mandatory/optional fields
2 years ago
Nutomic 788924d7ff
Merge different delete activities for better compatibility (fixes #2066) (#2073) 2 years ago
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
2 years ago
Nutomic 545fe8d0dd
Add federation tests for Friendica, improve parsing of source field (fixes #2057) (#2070) 2 years ago
Nutomic f23fed70bc
Add tombstone tests, better test errors (#2046) 2 years ago
Nutomic eea3308906
Add tests for lotide federation, make lotide groups fetchable (#2035)
* Add tests for lotide federation, make lotide groups fetchable

* Accept posts using Note type (and better error messages for tests)
2 years ago
Dessalines e65c45f152
Adding temporary bans. Fixes #1423 (#1999)
* Adding temporary bans. Fixes #1423

* Adding ban_expires to person

* Fix clippy

* Removing ban_expires from federated fields.

* Trying to add expires to blockcommunity apub.
2 years ago
Nutomic c6ac606f60
Test pleroma follow (#1988)
* Add test case for Pleroma follow activity (ref #1984)

* Use WithContext in apub tests where possible
3 years ago
Colin Reeder e2baed9a6d
Add lotide activities to tests 3 years ago
Felix Ableitner a2707e1c56 Community outbox should only contain activities sent by community (fixes #1916) 3 years ago
Felix Ableitner 3249060f67 Remove to field from follow activities 3 years ago
Aode (lion) 20cddf5e81 Support mastodon deletes 3 years ago
Felix Ableitner 7f4a773b88 Create and Note always need to tag parent creator, for mastodon notifications 3 years ago
Felix Ableitner 5319046dc7 Add federation test cases for Smithereen and Mastodon 3 years ago
Felix Ableitner c21c142a9a Include apub context from file, so that it can be embedded in docs 3 years ago
Felix Ableitner 1c6f74cad5 Convert note.content and chat_message.content to html (fixes #1871) 3 years ago
Felix Ableitner 0bde2d595e Add tests for parsing activities and collections 3 years ago
Felix Ableitner aaaf039779 Move apub test files into tree structure 3 years ago
Felix Ableitner d89156810d Move @context out of object/activity definitions 3 years ago
Felix Ableitner 74523fb534 Make Note.context optional for pleroma compat (hack) 3 years ago
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
3 years ago
Nutomic dd0ba10b44
Pleroma federation2 (#1855)
* Allow fetching person from Pleroma, including test case (ref #1461)

* Added test case for parsing community from apub json

- fixed a bug with objectid (de)serialization
- fixed a bug with outbox fetching (ref #1582)

* Added apub test for post

* Ignore errors when reading community outbox (fixes #1582)

* Dont fetch community outbox/moderators during tests

* added test for lemmy comment

* Added federation test for pleroma comment

* Added html2md crate to parse comment html from pleroma (fixes #1461)

* some fixes for update_apub_test_files.sh

* Add tests for ToApub, private message, remove update script

* Delete objects from db at the end of each test
3 years ago