Commit graph

1108 commits

Author SHA1 Message Date
silverpill
d4f701332f Use numbers to represent identity proof type in database 2023-03-13 21:29:40 +00:00
silverpill
8400241ab4 Add audio/ogg and audio/x-wav to the list of supported media types 2023-03-12 20:14:58 +00:00
silverpill
43d084de8d Enable audio and video uploads 2023-03-12 20:13:53 +00:00
silverpill
2b6de17fb9 Save latest ethereum block number to database instead of file 2023-03-12 17:13:38 +00:00
silverpill
0e9879bacb Remove ability to switch from Ethereum devnet to another chain without resetting subscriptions
Assuming migration is over (migration started at 2eb7ec2f64).
2023-03-12 15:53:40 +00:00
silverpill
138c1e915e Allow ! after hashtags and mentions 2023-03-11 17:12:37 +00:00
silverpill
268707a78a Disable post tokenization feature 2023-03-11 14:40:23 +00:00
silverpill
b5365099a4 Store NFT monitor state in database 2023-03-11 10:33:52 +00:00
silverpill
a300a822ec Create internal_property database table 2023-03-11 10:33:48 +00:00
silverpill
50f31e96fc Add federation.onion_proxy_url configuration parameter 2023-03-07 14:53:24 +00:00
silverpill
94a5f3a3cd Implement NodeInfo 2.1 2023-03-06 19:50:12 +00:00
silverpill
0817177282 Move federation client builders to activitypub::http_client module 2023-03-06 18:50:55 +00:00
silverpill
f17c9d9f76 Add CLI command for viewing unreachable actors 2023-03-06 00:53:57 +00:00
silverpill
522fd5bafa Refresh emoji caches when emoji is deleted 2023-03-05 19:42:46 +00:00
silverpill
452de34780 Support audio attachments 2023-03-05 19:29:29 +00:00
silverpill
ba1c694294 Add "emojis" field to Mastodon API Account entity 2023-03-05 19:09:58 +00:00
silverpill
70c2d2aa25 Create profile_emoji database table 2023-03-04 21:12:02 +00:00
silverpill
bd53e147ca Save emojis attached to actor objects 2023-03-03 23:22:04 +00:00
silverpill
4204350375 Deserialize actor tag to Vec<Value> 2023-03-03 22:11:41 +00:00
silverpill
6335e216a9 Add registration.default_role configuration option 2023-03-03 18:14:02 +00:00
silverpill
1b1e2a1521 Allow to add notes to generated invite codes 2023-03-02 17:24:32 +00:00
silverpill
721238d897 Deserialize object tag to Vec<Value> 2023-02-28 17:02:29 +00:00
silverpill
849b201ab9 Deserialize actor attachments into Vec instead of Option<Vec> 2023-02-28 00:34:23 +00:00
silverpill
82b6c4e7cf Add /api/v1/accounts/{account_id}/aliases API endpoint 2023-02-26 23:18:45 +00:00
silverpill
baec22272d Follow FEP-e232 links when importing post 2023-02-26 23:04:56 +00:00
silverpill
49b0011a9c Fetch missing profiles before doing follower migration 2023-02-26 20:21:21 +00:00
silverpill
e02ebebe02 Process follower migration request in background 2023-02-26 20:16:43 +00:00
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
e4254e7a3d Add "error" and "error_description" fields to Mastodon API error responses 2023-02-25 23:38:42 +00:00
silverpill
971b541826 Change path of user's Atom feed to /feeds/users/{username} 2023-02-25 21:25:25 +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
f66e0b812f Make webfinger response compatible with GNU Social account lookup 2023-02-24 11:15:44 +00:00
silverpill
56e0ed8f5d Add empty spoiler_text property to Mastodon API Status object 2023-02-24 00:26:39 +00:00
silverpill
bacb8c8380 Prevent delete-extraneous-posts command from removing locally-linked posts 2023-02-23 21:43:37 +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
227eef2d6b Add Content-Security-Policy and X-Content-Type-Options headers to all responses 2023-02-22 17:56:47 +00:00
silverpill
e1e9851d5c Make media URLs in Mastodon API responses relative to current origin 2023-02-22 17:56:43 +00:00
silverpill
c796cddff8 Change order of parameters in some functions 2023-02-22 17:30:31 +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
2f621201f8 Accept webfinger requests where "resource" is instance actor ID 2023-02-19 22:18:14 +00:00
silverpill
21054de712 Make /api/v1/statuses endpoint compatible with Mastodon clients 2023-02-19 19:38:27 +00:00
silverpill
e8ea52adba Move create_auth_error_handler function to http module 2023-02-19 17:10:29 +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
bcef9bb989 Remove database-specific code from utils::caip2 module 2023-02-18 21:53:20 +00:00
silverpill
f1972be8db Add generate_random_sequence() function 2023-02-18 21:29:27 +00:00
silverpill
a9cb1c6a83 Add test for make_entry function 2023-02-18 19:48:17 +00:00
silverpill
1d16fb45a5 Change /api/v1/{status_id}/context response format to match Mastodon API 2023-02-13 00:28:34 +00:00
silverpill
23b44ce0db Add /api/v1/{status_id}/thread API endpoint 2023-02-12 23:24:28 +00:00
silverpill
9fd6724819 Add test for get_thread() function 2023-02-12 23:07:30 +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
c461fbc268 Re-export ammonia::clean_text from utils::html 2023-02-12 21:38:22 +00:00
silverpill
2acf50fa01 Move some functions from utils::files to media module 2023-02-12 19:10:33 +00:00
silverpill
0988c0c91e Improve ethereum address validation and move validator to ethereum::utils module 2023-02-12 18:26:39 +00:00
silverpill
fdd3a22807 Support "authorization_code" OAuth grant type 2023-02-11 23:30:51 +00:00
silverpill
cf69f1394a Add OAuth authorization page 2023-02-11 23:30:46 +00:00
silverpill
2d9a43b076 Add /api/v1/apps endpoint 2023-02-11 17:14:37 +00:00
silverpill
4ace00736b Refactor search::helpers module 2023-02-10 17:14:34 +00:00
silverpill
0b8553d0c2 Allow instance_uri configuration value to contain URI scheme 2023-02-10 11:55:05 +00:00
silverpill
cbc3f7b65a Fix permission error on subscription settings update 2023-02-09 19:56:51 +00:00
silverpill
344025ae2f Move ChainId to Currency conversion code to utils::caip2 module 2023-02-08 00:25:54 +00:00
silverpill
eeae9e3ad7 Remove dependency on activitypub module from config::main 2023-02-07 18:28:19 +00:00
silverpill
8289aeaf41 Move parse_caip2_chain_id() to utils::caip2 module 2023-02-07 17:30:06 +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
5d4cfab00a Replace ConversionError with ConfigError in config module 2023-02-05 21:30:51 +00:00
silverpill
831739d215 Ignore Announce(Delete) activities 2023-02-05 21:01:12 +00:00
silverpill
ad1a658806 Implement automatic pruning of empty profiles 2023-02-05 20:28:55 +00:00
silverpill
6002e58425 Implement automatic pruning of remote posts 2023-02-05 13:37:41 +00:00
silverpill
0ab374e9ea Move periodic tasks to job_queue::periodic_tasks module 2023-02-05 12:11:30 +00:00
silverpill
3f89d97a5c Rename Task enum to PeriodicTask 2023-02-05 11:41:41 +00:00
silverpill
b91e6e77b5 Add limits.posts.character_limit configuration parameter 2023-02-04 22:03:37 +00:00
silverpill
151b068d97 Make maximum size of media attachment configurable 2023-02-04 22:03:32 +00:00
silverpill
79404fdc71 Don't allow read-only users to manage subscriptions 2023-02-04 22:00:03 +00:00
silverpill
09b16599d9 Don't create invoice if recipient can't accept subscription payments 2023-02-04 22:00:03 +00:00
silverpill
4559f74881 Use "warn" log level for delivery errors 2023-02-04 22:00:03 +00:00
silverpill
8bb786c763 Set 10 minute timeout on background job that processes incoming activities
https://codeberg.org/silverpill/mitra/issues/24
2023-02-04 22:00:02 +00:00
silverpill
e784476344 Add /api/v1/custom_emojis endpoint 2023-02-04 21:59:59 +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
f142bee72b Refactor create_post() function 2023-01-31 13:56:25 +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
08c55cc71c Use proof suites with prefix Mitra 2023-01-28 19:47:44 +00:00
silverpill
385a11d6a7 Don't retry activity if fetcher recursion limit has been reached 2023-01-26 13:57:46 +00:00
silverpill
1f9669ad7c Add set-role command 2023-01-26 00:00:17 +00:00
silverpill
01f956b6ce Add configuration option for automatic assigning of "read-only user" role after registration 2023-01-26 00:00:14 +00:00
silverpill
2ea14635d2 Implement role system
https://codeberg.org/silverpill/mitra/issues/25
2023-01-25 23:59:39 +00:00
silverpill
771f45baab Add registration.type configuration option 2023-01-25 23:47:36 +00:00
silverpill
b82c2f3fc6 Add missing <link rel="alternate"> element to Atom feed entries 2023-01-25 22:24:45 +00:00
silverpill
9fc87803e5 Add missing <link rel="self"> element to Atom feeds 2023-01-25 22:22:56 +00:00
silverpill
780b165a8b Improve Atom feed XML formatting 2023-01-25 22:09:32 +00:00
silverpill
f52a55a387 Add approval_required and invites_enabled flags to InstanceInfo object 2023-01-25 20:30:51 +00:00
silverpill
ce8f597501 Move parse_env() and parse_config() to config::loader module 2023-01-25 20:30:51 +00:00
silverpill
8dfb040b5f Refactor parse_env() function 2023-01-25 20:30:51 +00:00
silverpill
200675464e Replace config.version field with constant 2023-01-25 20:30:51 +00:00
silverpill
e78e3c5102 Increase length of logged inbox response 2023-01-25 20:30:43 +00:00
silverpill
fe6d99c5b1 Drop support for "blockchain" setting 2023-01-25 04:41:03 +00:00
silverpill
e24f01a2b5 Allow custom emojis with image/apng media type 2023-01-22 23:52:17 +00:00
silverpill
42329328ec Create workspace and move mitractl to a separate crate 2023-01-22 20:50:28 +00:00
silverpill
203582f801 Add days_before_now() utility function 2023-01-22 20:40:05 +00:00
silverpill
d09770913b Replace client-side tag URLs with collection IDs 2023-01-22 15:32:23 +00:00
silverpill
be67972760 Add emojis to post previews 2023-01-21 23:00:21 +00:00
silverpill
97145efad9 Make delete-emoji command accept emoji name and hostname instead of ID 2023-01-21 22:56:52 +00:00
silverpill
f6026293a5 Add test for create_attachment() 2023-01-21 22:56:52 +00:00
silverpill
75579eae4f Add support for emoji shortcodes 2023-01-21 22:56:46 +00:00
silverpill
e8500b982b Add import-emoji command 2023-01-21 19:52:36 +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
eb825bca04 Add fallback route for well-known paths 2023-01-18 18:25:40 +00:00
silverpill
2dda00e36c Fix .well-known paths returning 400 Bad Request errors 2023-01-18 17:47:23 +00:00
silverpill
441264f34c Allow emojis with image/gif media type 2023-01-18 16:45:51 +00:00
silverpill
6d6a41d3e5 Print HTTP socket address when starting HTTP server 2023-01-18 16:28:52 +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
6ba8434f40 Add delete-emoji command 2023-01-17 16:47:13 +00:00
silverpill
578629f8bd Add emoji array to Status object 2023-01-17 16:47:13 +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
5809cffa71 Prevent delete-extraneous-posts command from deleting post if there's a recent reply or repost 2023-01-16 13:01:56 +00:00
silverpill
73145a9af6 Add test for find_extraneous_posts() 2023-01-16 12:46:00 +00:00
silverpill
3ed610969e Add new types to supported media types list 2023-01-15 02:30:00 +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