Commit graph

40 commits

Author SHA1 Message Date
fbadb2d7bd
Try to fix federation test on ci (#2121) 2022-03-07 21:25:34 +00:00
ef1e164cc5
Make activity queue worker count configurable, log stats (#2113) 2022-03-03 18:54:33 +00:00
fa29ffade1
Add timeout for sending activities (#2112)
* Add timeout for sending activities

* Also set request timeouts in utils/src/request.rs
2022-03-03 13:40:10 -05:00
63565712ad
Fix resending activities (fixes #1282) (#2109) 2022-03-01 13:40:05 -05:00
e094989a4c
Add logging to debug federation issues (ref #2096) (#2099) 2022-02-17 18:48:45 +00:00
Dessalines
a212f6b780
Fixing liking comment on blocked person. Fixes #2033 (#2042) 2022-01-19 14:17:18 +00:00
bc8ed1e6da
Remove unneeded dependency on activitystreams (#2034) 2022-01-13 00:17:00 +00:00
41b90bb162
Add console-subscriber (#2003)
* Add console-subscriber

* Add larg event buffer capacity

* Add console port to lemmy prod container

* Expose pict-rs console port

* Update pictrs
2022-01-07 09:53:45 -05:00
3032a2745b
Opentelemetry (#1992)
* Add otlp export

* Add jaeger to dev docker

* More instrument

* Update deps

* Merge from main.

* Add comment about viewing traces

* Fixing reqwest-tracing dep.

* Update pre-commit regex

* Move imports to top

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-01-06 19:10:20 +00:00
97ebf2f6f3 Consolidate reqwest clients, use reqwest-middleware for tracing 2021-12-06 16:54:34 -06:00
Dessalines
040770d7ba
Fix retry infinite loops. Fixes #1964 (#1967)
* Fix retry infinite loops. Fixes #1964

* Moving retry_limit to settings
2021-12-05 10:03:13 -05:00
1579ee566f
background-jobs 0.11 (#1943) 2021-11-23 12:20:01 +00:00
3fea5645f8
Add tracing (#1942) 2021-11-23 12:16:47 +00:00
e88106cef4 Use once_cell instead of lazy_static 2021-11-22 19:58:31 +01:00
05d43150bc Making public key required. Fixes #1934 2021-11-22 10:10:18 -05:00
f07aaf417a Remove HTTP signature compatibility mode (its not necessary) 2021-11-18 17:06:10 +01:00
dc416bf255 Make http signature compatible with mastodon 2021-11-16 18:06:01 +01:00
579ca37ddf Make webfinger standard compliant 2021-11-16 18:03:09 +01:00
1b9414f292
More federation compat (#1894)
* Make HTTP signatures compatible with Pleroma

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

* remove unused code
2021-11-11 14:49:15 -05:00
f035af3738 Fixing clippy 2021-11-09 17:31:28 -05:00
a5a674a270 Add method ApubObject.verify() 2021-11-06 18:35:14 +01:00
02ce7bdc7d Remove unused ActorType methods 2021-11-06 15:01:00 +01:00
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
2021-11-06 14:53:39 +01:00
c725514841 Change to_apub and from_apub to take by value and avoid cloning 2021-11-06 14:47:58 +01:00
2edf8ba157 Move ObjectId to library 2021-11-05 21:37:46 +01:00
bd3352423a Remove ActivityFields trait, deserialize into another struct instead 2021-11-05 21:14:19 +01:00
271785b7fb When receiving activity, dont read community from cc (for pleroma compat and better verification) 2021-10-29 12:50:30 +02:00
03b8ae7215 Activity.to should always be a vec (and unspecified size for public activities) 2021-10-29 12:45:54 +02:00
61189efe72
Rewrite collections to use new fetcher (#1861)
* Merge traits ToApub and FromApub into ApubObject

* Rewrite community outbox to use new fetcher

* Rewrite community moderators collection

* Rewrite tombstone
2021-10-27 12:03:07 -04:00
1aa0e1997b Major refactor, adding newtypes for apub crate
- this allows moving FromApub/ToApub traits into apub lib
2021-10-20 12:28:09 +02:00
d206aad282 Remove DeletableApubObject trait 2021-10-20 12:20:54 +02:00
Dessalines
53a2b6d013
Trying a background_jobs fix. #1820 (#1822) 2021-10-08 14:36:53 +00:00
b96ce81f89
Move code to apub library (#1795)
* Remove dependency of apub_lib on LemmyContext

* Move ApubObject trait to library

* Reorganize files in apub lib

* Move ActorType, signatures, activity_queue to apub library
2021-10-06 16:20:05 -04:00
8708ad1b44 Moving settings and secrets to context. 2021-09-27 11:25:26 +02:00
251e0d3b82 Move resolving of activitypub objects to separate api endpoint (fixes #1584) 2021-08-20 12:35:50 +02:00
f6f169b4eb
Rewrite remaining activities (#1712)
* Limit type/method visibility in apub code

* Simplify db_queries traits by removing generics

* Simplify delete activity implementation

* Rewrite delete activities

* Implement helper functions for websocket message sending

* When receiving delete reason as empty string, change to none

* Rewrite remaining activities

* Simplify inbox

* Remove struct ActivityCommonFields, derive ActivityFields trait instead

* Community should announce received activities to followers
2021-08-19 17:24:33 -04:00
353a1fe0a0
Rewrite activitypub following, person, community, pm (#1692)
* Rewrite following activities

* Rewrite person apub

* Rewrite community apub

* Rewrite private message activity sending
2021-08-12 08:48:09 -04:00
433ab1e78b Add docs for MediaType, PublicUrl values 2021-07-30 23:16:33 +02:00
ff265c7ebc Rewrite apub post (de)serialization using structs (ref #1657) 2021-07-30 23:16:32 +02:00
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