Commit graph

540 commits

Author SHA1 Message Date
silverpill
62069dc011 Increase number of delivery attempts and increase intervals between them 2023-02-26 20:16:39 +00:00
silverpill
c201f3ea2b Store information about failed activity deliveries in database 2023-02-26 14:49:01 +00:00
silverpill
ca2e541ff5 Store delivery statuses in delivery job data
Preparing for migration to a new delivery queue mechanism.
2023-02-25 19:28:23 +00:00
silverpill
0f3c247069 Put activities generated by CLI commands in a queue 2023-02-25 19:28:23 +00:00
silverpill
49f51f44d8 Replace magic numbers in activitypub::queues module with constants 2023-02-25 19:28:19 +00:00
silverpill
f5c012769f Prefer Group actor when doing webfinger query on Lemmy server 2023-02-24 13:12:38 +00:00
silverpill
0245eb59a2 Set deliverer timeout to 30 seconds 2023-02-22 21:54:08 +00:00
silverpill
872fe8fef3 Set fetcher timeout to 3 minutes 2023-02-22 21:48:19 +00:00
silverpill
2b5d4562aa Make activities pass JSON-LD validation 2023-02-22 17:30:28 +00:00
silverpill
50176b00cc Make actor objects pass JSON-LD validation 2023-02-22 17:29:36 +00:00
silverpill
10f2596830 Move config parser to mitra-config crate 2023-02-19 00:39:15 +00:00
silverpill
7d3c558ede Move utils to mitra-utils crate 2023-02-18 23:12:36 +00:00
silverpill
6945ded963 Group imports 2023-02-12 23:07:19 +00:00
silverpill
bc3184cf77 Rename new_uuid function to generate_ulid 2023-02-12 22:04:31 +00:00
silverpill
2acf50fa01 Move some functions from utils::files to media module 2023-02-12 19:10:33 +00:00
silverpill
eeae9e3ad7 Remove dependency on activitypub module from config::main 2023-02-07 18:28:19 +00:00
silverpill
53d012c9d0 Use header name constants in activitypub::views module 2023-02-07 12:00:22 +00:00
silverpill
239bdcf97d Process Delete() and Undo() activities in background to preserve ordering 2023-02-07 00:03:41 +00:00
silverpill
831739d215 Ignore Announce(Delete) activities 2023-02-05 21:01:12 +00:00
silverpill
151b068d97 Make maximum size of media attachment configurable 2023-02-04 22:03:32 +00:00
silverpill
4559f74881 Use "warn" log level for delivery errors 2023-02-04 22:00:03 +00:00
silverpill
0b442f6a2c Ignore forwarded Like activities 2023-02-02 00:48:03 +00:00
silverpill
5a3ef41277 Append attachment URL to post content if attachment is too large 2023-01-31 19:03:03 +00:00
silverpill
01c894da9d Separate object URL handling from content validation 2023-01-31 19:03:03 +00:00
silverpill
bc19a524c4 Replace post attachments and other related objects when processing Update(Note) activity 2023-01-31 18:47:34 +00:00
silverpill
86beb532e2 Refactor handle_note() function 2023-01-31 14:18:46 +00:00
silverpill
70455e5eeb Return "202 Accepted" when activity is accepted by inbox endpoint 2023-01-29 21:13:35 +00:00
silverpill
f55431f8b8 Improve some error descriptions 2023-01-29 20:04:23 +00:00
silverpill
6f38eba80e Add https://w3id.org/security/data-integrity/v1 to JSON-LD context 2023-01-28 22:43:15 +00:00
silverpill
385a11d6a7 Don't retry activity if fetcher recursion limit has been reached 2023-01-26 13:57:46 +00:00
silverpill
e78e3c5102 Increase length of logged inbox response 2023-01-25 20:30:43 +00:00
silverpill
d09770913b Replace client-side tag URLs with collection IDs 2023-01-22 15:32:23 +00:00
silverpill
75579eae4f Add support for emoji shortcodes 2023-01-21 22:56:46 +00:00
silverpill
b958b8fb4c Save sizes of media attachments and other files to database 2023-01-21 19:52:32 +00:00
silverpill
e3b51d0752 Validate emoji name before saving 2023-01-21 12:41:37 +00:00
silverpill
99d45ee048 Create custom type for emoji images 2023-01-20 22:11:01 +00:00
silverpill
6c6eb731f9 Use usize type for file sizes 2023-01-20 01:00:15 +00:00
silverpill
c26fc9235d Group imports in some modules 2023-01-19 22:00:04 +00:00
silverpill
441264f34c Allow emojis with image/gif media type 2023-01-18 16:45:51 +00:00
silverpill
52112996c5 Try to fix federation with GNU Social 2023-01-18 13:26:04 +00:00
silverpill
6af5b8c24d Ignore Like() activity if local post doesn't exist 2023-01-18 01:14:21 +00:00
silverpill
01f56d9ef7 Use re-exported tokio_postgres::GenericClient trait 2023-01-18 01:01:45 +00:00
silverpill
0e68ea263c Increase max emoji size to 250 kB 2023-01-17 20:47:34 +00:00
silverpill
fcb6554ebb Don't download HTML pages attached by GNU Social 2023-01-17 19:16:46 +00:00
silverpill
10c38400e4 Accept actor objects where value of "attachment" property is not an array 2023-01-17 18:04:16 +00:00
silverpill
56e75895bd Download custom emojis contained in remote posts 2023-01-17 16:47:09 +00:00
silverpill
7b8a56dd8f Support "Public" audience identifier 2023-01-17 00:51:35 +00:00
silverpill
5064afd766 Change max actor image size to 5 MB 2023-01-16 20:34:24 +00:00
silverpill
4d29c83365 Validate emoji tags 2023-01-15 02:14:02 +00:00
silverpill
143879caf9 Ignore deserialization errors when parsing object tags 2023-01-15 02:07:52 +00:00
silverpill
a22ae40d8e Create SimpleTag and LinkTag types 2023-01-15 01:50:44 +00:00
silverpill
41fdb8abb0 Rename activitypub::activity module to activitypub::types 2023-01-14 23:31:38 +00:00
silverpill
72637fe80c Add mediaType property to images in actor object 2023-01-14 19:39:19 +00:00
silverpill
53138ea1c7 Don't fetch HTML pages attached by GNU Social 2023-01-14 19:38:28 +00:00
silverpill
7c07cd79bc Use "mediaType" property value to determine file extension when saving downloaded media 2023-01-14 02:10:06 +00:00
silverpill
85dbb6f392 Save downloaded media as "unknown" if its media type is not supported 2023-01-14 02:08:28 +00:00
silverpill
51cb72d142 Add test for get_note_author_id 2023-01-13 01:31:45 +00:00
silverpill
5c0672884a Log actor tags at debug level 2023-01-13 01:31:45 +00:00
silverpill
cbc78f9532 Support "as:Public" audience identifier 2023-01-13 01:31:45 +00:00
silverpill
5c2685c785 Remove empty module 2023-01-13 01:31:45 +00:00
silverpill
48de6218eb Add webfinger test 2023-01-13 01:31:45 +00:00
silverpill
7218864563 Don't stop activity processing on invalid local mentions 2023-01-11 21:55:40 +00:00
silverpill
2385601e12 Create get_or_import_profile_by_actor_address helper function 2023-01-11 21:55:35 +00:00
silverpill
22cf00fd98 Propagate database errors returned by importer in search_profiles_or_import() 2023-01-11 21:26:53 +00:00
silverpill
7247441693 Don't ignore Delete(Person) verification errors if database error subtype is not NotFound 2023-01-11 21:26:53 +00:00
silverpill
af332283ed Move ActorAddress type to webfinger::types module 2023-01-11 21:26:52 +00:00
silverpill
5fec0c187d Sign Move() activity with server key 2023-01-11 21:26:48 +00:00
silverpill
228299c5b7 Remove prepare_signed_update_person() function 2023-01-09 16:22:47 +00:00
silverpill
65496e5260 Write values of actor tags to log 2023-01-07 20:47:42 +00:00
silverpill
44ce9a73a2 Save media types of uploaded avatar and banner images 2023-01-07 16:05:15 +00:00
silverpill
682cf09835 Store avatar and banner metadata as JSON objects 2023-01-07 12:22:33 +00:00
silverpill
65072ca3c5 Rename Image type to ActorImage 2023-01-07 12:08:15 +00:00
silverpill
6c850b0197 Move fetch_actor_images to actors::helpers module 2023-01-07 12:07:53 +00:00
silverpill
fe395480eb Set limit on number of media files that can be attached to post 2023-01-06 16:55:38 +00:00
silverpill
68e464c813 Don't sniff media type in save_file() 2023-01-06 15:41:09 +00:00
silverpill
5b3aa2a24b Fix federation with GNU Social 2023-01-05 19:55:17 +00:00
silverpill
5c9aa0f148 Always put outgoing activities in a queue 2023-01-04 19:36:57 +00:00
silverpill
30857868a0 Write tag value to log if tag type is Emoji 2023-01-04 17:40:17 +00:00
silverpill
498be66d8b Change actor status to "unreachable" if delivery to inbox fails 2023-01-01 21:48:23 +00:00
silverpill
534812efa2 Implement activity delivery queue 2023-01-01 19:45:41 +00:00
silverpill
b392d9164b Keep actor IDs when constructing OutgoingActivity 2023-01-01 19:44:50 +00:00
silverpill
1d234bd679 Stop generating reachability report after delivery 2023-01-01 19:40:43 +00:00
silverpill
b4f68aaec8 Rename IncomingActivity type 2022-12-31 13:28:25 +00:00
silverpill
0ecf682984 Move activity queue helpers to activitypub::queues module 2022-12-31 00:07:10 +00:00
silverpill
471442a22a Set limit on a number of requests in import_post 2022-12-29 17:32:38 +00:00
silverpill
de9bc7f35e Rewrite mention_to_address and parse_acct_uri, remove unnecessary regexp 2022-12-28 00:18:45 +00:00
silverpill
e7b318c761 Make post and profile page redirections work in Mastodon 2022-12-27 20:29:44 +00:00
silverpill
7494d62858 Make post/profile page redirection work when web client service is enabled 2022-12-24 17:59:40 +00:00
silverpill
b14338d5f0 Move frontend module to web_client::urls 2022-12-24 17:09:44 +00:00
silverpill
bf92cebe5c Write activity ID to log if repost already exists in database 2022-12-21 19:21:21 +00:00
silverpill
f2df270a82 Remove duplicate inboxes when constructing OutgoingActivity 2022-12-20 00:59:57 +00:00
silverpill
4d31b9f9f9 Reject activities from blocked instances before verifying signature 2022-12-20 00:59:57 +00:00
silverpill
a14c719d25 Ignore Announce(Dislike) activities 2022-12-14 16:34:30 +00:00
silverpill
68f7b046a1 Support manuallyApprovesFollowers property on actor objects 2022-12-14 09:34:45 +00:00
silverpill
d2e2b684e3 Refactor deliver_activity_worker() and prepare for queue serialization 2022-12-14 09:34:40 +00:00
silverpill
fcab5b000a Ignore Announce() activity if repost already exists but with a different object ID 2022-12-13 19:42:57 +00:00
silverpill
1b588a86e0 Handle non-nested Undo(Follow) activities 2022-12-13 01:12:42 +00:00
silverpill
f2037c9516 Save activity ID when processing remote follow request 2022-12-13 00:54:38 +00:00
silverpill
8c14b18d5b Extract integrity proof before fetching actor 2022-12-12 22:54:49 +00:00
silverpill
a85eaabf2f Process Announce() and Update() activities in background jobs 2022-12-12 22:54:43 +00:00