Commit Graph

269 Commits (d39bc14c43d9190c52779128f696c8ee27fb63e4)

Author SHA1 Message Date
Nutomic 7b86441bab
Federate with Peertube (#2244) 2 years ago
Nutomic 3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 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 ae84258c41
Federation: dont overwrite local object from Announce activity (#2232)
* Federation: dont overwrite local object from Announce activity (fixes #2143)

* add missing form fields

* refactoring

* add ap_id, updated fields

* fix
2 years ago
Nutomic bbd739af9b
Change Person, Instance types (#2200) 2 years ago
Nutomic fed73a72c1
Write mod log for federated sticky/lock post actions (#2203) 2 years ago
Nutomic 8337eaefdd
Federate user account deletion (fixes #1284) (#2199) 2 years ago
Nutomic 9ac1f46a2b
Dont federate initial upvote (#2196) 2 years ago
Nutomic f9d563d80a
Add missing mod log entries for federated actions (fixes #1489) (#2198) 2 years ago
Nutomic 65cac21713
Fix verify_mod_action check for remote admin actions (#2190)
* Fix verify_mod_action check for remote admin actions

* fix federation test
2 years ago
Nutomic bfae246734
Migrate towards using page.attachment field for url (ref #2144) (#2182) 2 years ago
Nutomic 589d952a95
Fetch community outbox in parallel (fixes #2180) (#2181) 2 years ago
Dessalines 4cf0da7b60 Clippy fixes. 2 years ago
Nutomic 610120067c
Add test files for Friendica federation (fixes #2144) (#2167) 2 years ago
Dessalines f2a0841586
Rate limit websocket joins. (#2165)
* Rate limit websocket joins.

* Removing async on mutex lock fn.

* Removing redundant ip

* Return early if check fails.
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 b406342a14
Dont log error if duplicate activity is received (fixes #2146) (#2148) 2 years ago
Nutomic 8112816e99
If viewed actor isnt in db, fetch it from other instance (#2145) 2 years ago
Nutomic bcf7ec6109
Forbid remote URLs for avatars/banners (fixes #1618) (#2132) 2 years ago
Nutomic 166ec196b0
Rework error handling (fixes #1714) (#2135) 2 years ago
Nutomic 7d61616dff
Revert "Add logging to debug federation issues (ref #2096) (#2099)" (#2130)
This reverts commit e094989a4c.
2 years ago
Nutomic f8fb3b41f0
Reject federated downvotes if downvotes are disabled (fixes #2124) (#2128) 2 years ago
Nutomic df757f28b4
Make delete activities backwards compatible with 0.15 (#2114) 2 years ago
Nutomic ef1e164cc5
Make activity queue worker count configurable, log stats (#2113) 2 years ago
Dessalines a5433ebf77 Fixing unit tests. 2 years ago
dayinjing 7f9b55e793
Hide community v2 (#2055)
* Initial working of hiding communities and adding a db entry for mod log

* Return mod log for hidden communities

* Clean up hidding communities PR

* use lower case like other migration files

* Formatting fix

* pass in admin id to list, make match logic the same in post_view as community_view. Dont force non null for reason

* Clean PR review stuff

* Change person_id to mod_person_id on hide community table

* Make bools optional, add a space for formating

Co-authored-by: Thor Odinson <odinson@asgard.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
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 e094989a4c
Add logging to debug federation issues (ref #2096) (#2099) 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 4a23ee4d8b
Dont make webfinger request when viewing community/user profile (fixes #1896) (#2049) 2 years ago
Nutomic f23fed70bc
Add tombstone tests, better test errors (#2046) 2 years ago
vpzomtrrfrt 272dc3e7a6
Accept single object as to for arrays too (#2048) 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
Rob Ede 1943bcd7f5
Prevent panic on InboxRequestGuard 2 years ago
Rob Ede f6c13cf313
Updated actix-web dependency to `4.0.0-beta.18` 2 years ago
Dessalines 1410c5659c
Upgrading deps (#1995) 3 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
Aode (lion) 5b3d707d8f Use from_message for static error string 3 years ago
Aode (lion) 97ebf2f6f3 Consolidate reqwest clients, use reqwest-middleware for tracing 3 years ago
Riley 35cbae61bc
Don't drop error context when adding a message to errors (#1958)
* Respond directly with LemmyError

Instrument Perform implementations for more precise traces
Use ApiError to format JSON errors when messages are present
Keep SpanTrace output in LemmyError Display impl

* Hide SpanTrace debug output from LemmyError

* Don't log when entering spans, only when leaving

* Update actix-web

* Update actix-rt

* Add newline after error info in LemmyError Display impl

* Propogate span information to blocking operations

* Instrument apub functions

* Use skip_all for more instrument attributes, don't skip 'self' in some api actions

* Make message a static string

* Send proper JSON over websocket

* Add 'message' to LemmyError display if present

* Use a quieter root span builder, don't pretty-print logs

* Keep passwords and emails out of logs

* Re-enable logging Login

* Instrument feeds

* Emit our own errors

* Move error log after status code recording

* Make Sensitive generic over the inner type

* Remove line that logged secrets
3 years ago
Dessalines 040770d7ba
Fix retry infinite loops. Fixes #1964 (#1967)
* Fix retry infinite loops. Fixes #1964

* Moving retry_limit to settings
3 years ago
Colin Reeder e2baed9a6d
Add lotide activities to tests 3 years ago
Colin Reeder a91c0c8feb
Allow single item for to, cc, and @context 3 years ago
Felix Ableitner 27a687bcd0 Dont send email notifications for edited comments (fixes #1925) 3 years ago
Riley 1579ee566f
background-jobs 0.11 (#1943) 3 years ago
Riley 3fea5645f8
Add tracing (#1942) 3 years ago
Dessalines 3e062a9959
Merge pull request #1938 from LemmyNet/once_cell
Use once_cell instead of lazy_static
3 years ago
Felix Ableitner e88106cef4 Use once_cell instead of lazy_static 3 years ago
Dessalines 3d08e6c1fc
Adding unique constraint for activity ap_id. Fixes #1878 (#1935)
* Adding unique constraint for activity ap_id. Fixes #1878

* Removing is_activity_already_known
3 years ago
Dessalines 05d43150bc Making public key required. Fixes #1934 3 years ago
Felix Ableitner afccd5cf69 Replace activitystreams crate with activitystreams-kinds 3 years ago
Felix Ableitner 3e4fe89a45 Fix build error in #1914 3 years ago
Dessalines 6d35508f08
Merge pull request #1914 from LemmyNet/dont-announce-note
Dont announce comments, edited posts to Pleroma/Mastodon followers
3 years ago
Dessalines 712dabd16b
Merge pull request #1918 from LemmyNet/fix-smithereen-webfinger
Fix Smithereen webfinger, remove duplicate webfinger impl (fixes #1916)
3 years ago
Felix Ableitner da89ea22fb Fix Smithereen webfinger, remove duplicate webfinger impl (fixes #1916) 3 years ago
Felix Ableitner aeb34199f5 Dont announce comments, edited posts to Pleroma/Mastodon followers 3 years ago
Felix Ableitner a2707e1c56 Community outbox should only contain activities sent by community (fixes #1916) 3 years ago
Felix Ableitner db631005d3 Fix error due to same activity being inserted in database twice 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 c1f1b8aa0f Activities in community should also be sent to actors in cc 3 years ago
Felix Ableitner 579ca37ddf Make webfinger standard compliant 3 years ago
Dessalines 23641fcd06 Use serde_json::to_value 3 years ago
Dessalines 09cd32034b
Fixing activity serialization. Fixes #1900 (#1901) 3 years ago
Nutomic 1b9414f292
More federation compat (#1894)
* Make HTTP signatures compatible with Pleroma

* Send Announce/Page, Announce/Note for Pleroma compatibility

* remove unused code
3 years ago
Dessalines 8d4c4fdf6c
Adding clippy:unwrap to husky. Fixes #1892 (#1893) 3 years ago
Felix Ableitner 9a1fe154db Remove header guard for activitypub routes 3 years ago
Dessalines 76220a4523
Fixing clippy lints. (#1885)
* Fixing clippy lints.

* Revert object id display

* Trying to fix clippy again
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 252d87d332 Fix clippy error 3 years ago
Felix Ableitner 888e683856 For verify_is_public() we also need to check cc field 3 years ago
Felix Ableitner a5a674a270 Add method ApubObject.verify() 3 years ago
Felix Ableitner 02ce7bdc7d Remove unused ActorType methods 3 years ago
Felix Ableitner 8ea21c39b7 Reduce stack memory usage in apub code
- use our own, smaller Endpoints struct
- wrap ObjectId.url in Box
- adjust usage of Box in different places
3 years ago
Felix Ableitner c725514841 Change to_apub and from_apub to take by value and avoid cloning 3 years ago
Felix Ableitner 2edf8ba157 Move ObjectId to library 3 years ago
Felix Ableitner bd3352423a Remove ActivityFields trait, deserialize into another struct instead 3 years ago
Felix Ableitner 969a7f2d1b Refactoring apub code 3 years ago
Dessalines a83113935d
Check if post or comment are deleted first. Fixes #1864 (#1867)
* Check if post or comment are deleted first. Fixes #1864

* Refactoring delete apub.

* Revert "Refactoring delete apub."

This reverts commit ba2c3d06cfb870efe792f4b2541036265b425156.
3 years ago
Felix Ableitner 41f7bcc0d2 Correctly use and document check_is_apub_id_valid() param use_strict_allowlist 3 years ago
Felix Ableitner b396344eae Merge two functions into one 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 03d8ac75ef Move activity structs to protocol folder 3 years ago
Felix Ableitner 5ff044346f Move object and collection structs to protocol folder 3 years ago
Felix Ableitner 358ef99ea2 Rewrite community followers and user outbox to use our own structs 3 years ago
Felix Ableitner d89156810d Move @context out of object/activity definitions 3 years ago
Felix Ableitner 2d04ff93f5 Change activity.cc to Vec<Url> in public activities 3 years ago
Felix Ableitner 271785b7fb When receiving activity, dont read community from cc (for pleroma compat and better verification) 3 years ago
Felix Ableitner 74523fb534 Make Note.context optional for pleroma compat (hack) 3 years ago
Felix Ableitner 03b8ae7215 Activity.to should always be a vec (and unspecified size for public activities) 3 years ago
Felix Ableitner 614490d29b Fix problem that prevented viewing of pleroma user profiles 3 years ago
Felix Ableitner 0af047dd83 Rewrite community moderators collection 3 years ago