Commit graph

390 commits

Author SHA1 Message Date
silverpill
914fae8137 Move parts of import_post to inbox::create_note module 2022-05-02 16:43:13 +00:00
silverpill
787992265e Move Update(Person) activity handler to inbox::update_person module 2022-05-02 12:56:16 +00:00
silverpill
b9ae2f07e7 Rename fetch_attachment to fetch_file 2022-05-02 00:01:57 +00:00
silverpill
fd067713d7 Allow to search for usernames containing "-" character 2022-05-01 11:30:15 +00:00
silverpill
fac0172159 Generate RSA key for instance actor automatically on the first run 2022-04-30 20:03:21 +00:00
silverpill
a1af46f566 Change default login message and update config example
Consider "ethereum" auth flow deprecated.
2022-04-30 16:35:54 +00:00
silverpill
7ed919a295 Set max size for names and values of extra fields 2022-04-30 16:03:41 +00:00
silverpill
8755177eed Convert incoming questions and pages into posts 2022-04-29 13:21:00 +00:00
silverpill
ff5f707cba Prioritize verified results when searching for profile by subscription address 2022-04-27 22:57:49 +00:00
silverpill
303827ffc6 Include results based on identity proofs when searching profiles by wallet address 2022-04-27 22:19:50 +00:00
silverpill
a1af35997c Use currency enum instead of WALLET_CURRENCY_CODE constant 2022-04-27 22:19:14 +00:00
silverpill
b384dcd4d2 Allow Tag objects without name property 2022-04-27 10:39:26 +00:00
silverpill
7a47c28034 Federate identity proofs as actor attachments
https://codeberg.org/silverpill/mitra/issues/7
2022-04-27 10:31:59 +00:00
silverpill
83fbbefaab Add test for get_local_actor() 2022-04-26 22:35:39 +00:00
silverpill
8deea0c867 Save submitted identity proofs to database 2022-04-26 20:43:39 +00:00
silverpill
fd6b71073a Add IdentityProof type 2022-04-26 19:56:32 +00:00
silverpill
356592bc71 Add views for generating address ownership proof 2022-04-26 19:56:26 +00:00
silverpill
e697461e70 Add function that performs address ownership verification 2022-04-26 19:32:08 +00:00
silverpill
fc60bb78f2 Implement ToString and FromStr traits for SignatureData 2022-04-26 19:32:02 +00:00
silverpill
bffe3bbe7d Don't hash initial message when making EIP-191 signature 2022-04-22 21:27:53 +00:00
silverpill
a97456d77a Pass Actor object instead of Value when creating/updating profile 2022-04-21 23:10:30 +00:00
silverpill
a9504de10d Add json_from_sql and json_to_sql macros 2022-04-21 23:10:24 +00:00
silverpill
536c7ecb21 Bump web3 to 0.18.0 2022-04-20 17:30:30 +00:00
silverpill
e4c5440ec2 Increase max number of extra profile fields to 20 2022-04-20 14:41:25 +00:00
silverpill
997d9257af Improve descriptions of database errors 2022-04-20 14:05:09 +00:00
silverpill
04e851025b Enforce uniqueness of actor ID 2022-04-20 14:03:13 +00:00
silverpill
0715b7d64f Use actor ID for href field in mention tag
Mastodon also does this in latest version.
2022-04-20 14:02:39 +00:00
silverpill
ffdda2ac51 Add recover_address() function
It can be used to recover ethereum address from signature.
2022-04-19 22:59:09 +00:00
silverpill
0d6807e5a2 Move address_to_string to ethereum::utils module 2022-04-16 22:32:50 +00:00
silverpill
c0837bbf77 Create Atom feeds for local users 2022-04-16 19:37:45 +00:00
silverpill
aa997e3a82 Make activity IDs deterministic 2022-04-14 18:33:18 +00:00
silverpill
0bc3c32fcd Allow value of "attachment" property to be an object 2022-04-14 15:58:29 +00:00
silverpill
56d1ebf9e5 Add include_reposts parameter to get_posts_by_author() func 2022-04-13 21:26:30 +00:00
silverpill
78d66f8a06 Prevent interactions with reposts 2022-04-13 21:26:30 +00:00
silverpill
2fda205dbf Rename process_note() to import_post() and change its error type to ImportError 2022-04-13 19:19:19 +00:00
silverpill
ec44fce526 Write warning to log when processing remote post of unexpected type 2022-04-13 19:00:27 +00:00
silverpill
513f10ab4f Write warning to log when encountering unexpected actor property type 2022-04-12 18:34:01 +00:00
silverpill
f914702de9 Allow duplicate labels in extra profile fields 2022-04-12 15:11:26 +00:00
silverpill
4a1b75969f Replace actix-rt with tokio in scheduler module 2022-04-12 12:39:32 +00:00
silverpill
541894f4df Update clap to stable version 2022-04-10 19:51:03 +00:00
silverpill
30bd3d6a37 Migrate to actix 4.0 and tokio 1 2022-04-10 19:14:45 +00:00
silverpill
ed68b728be Avoid deconstruction when using path extractor
Preparing for migration to actix 4.
2022-04-09 17:11:41 +00:00
silverpill
8a6dbca214 Change /reblog method to return repost info instead of original post
This is done to comply with Mastodon API spec.
2022-04-08 18:55:51 +00:00
silverpill
2ebcc10dcb Add comments to home timeline SQL query 2022-04-08 18:55:29 +00:00
silverpill
60b683b657 Allow to hide replies from given author from home timeline 2022-03-09 20:42:02 +00:00
silverpill
bdce305b24 Change default PostgreSQL port 2022-03-09 20:41:56 +00:00
silverpill
ee7ae3cd4f Implement instance blocks 2022-02-23 23:38:43 +00:00
silverpill
0727b739ed Move HTTP signature verification to receive_activity() function 2022-02-23 23:38:00 +00:00
silverpill
bf27903ee9 Drop database connection before starting HTTP server 2022-02-23 21:33:56 +00:00
silverpill
3a584f52b5 Add attachment type "video" 2022-02-23 17:55:53 +00:00
silverpill
f14e762ee3 Allow to hide reposts made by given actor from home timeline 2022-02-23 16:55:25 +00:00
silverpill
0f47fa201d Move get_relationship function to mastodon_api module 2022-02-21 22:32:36 +00:00
silverpill
c4a1da5349 Move RelationshipQueryParams type to types module 2022-02-21 15:27:25 +00:00
silverpill
8b4325ad96 Add CLI command that deletes old remote posts 2022-02-20 23:36:04 +00:00
silverpill
76106e4214 Delete media attached to descendants of posts when profile is deleted 2022-02-20 23:24:22 +00:00
silverpill
54277e410d Delete media attached to descendants of post when it is deleted 2022-02-20 23:24:17 +00:00
silverpill
9bc8997fb5 Identify incoming followers-only posts 2022-02-18 17:57:11 +00:00
silverpill
50630c004a Validate and clean extra fields when importing profile 2022-02-17 21:08:43 +00:00
silverpill
0993a3b38c Improve username validation 2022-02-17 20:39:18 +00:00
silverpill
82e24ad8b0 Validate and clean bio when profile is created or updated 2022-02-17 20:38:56 +00:00
silverpill
4e010f1698 Add profile data validation to get_or_import_profile_by_actor_id 2022-02-16 23:46:01 +00:00
silverpill
848de1d685 Set default tag type to Hashtag 2022-02-15 23:14:39 +00:00
silverpill
227e3d3729 Allow passwordless registration 2022-02-15 19:43:22 +00:00
silverpill
6ddfb5b52d Do EIP-4361 verification at signup 2022-02-15 01:35:02 +00:00
silverpill
e8a29a3af1 Implement EIP-4361 authentication 2022-02-14 23:16:00 +00:00
silverpill
d3e3c1eb3e Refactor struct conversion in create_account() handler 2022-02-14 22:08:35 +00:00
silverpill
e756bbacf4 Add tests for note visibility detection 2022-02-13 20:12:31 +00:00
silverpill
a5d3aa488b Require replies to non-public posts to have direct visibility 2022-02-13 18:16:59 +00:00
silverpill
79e7d960fb Log more details when processing non-public note 2022-02-13 16:42:01 +00:00
silverpill
226fc49b86 Allow non-standard wrap width when parsing public keys in PEM format 2022-02-13 15:44:28 +00:00
silverpill
e48a8999f5 Make /api/v1/accounts return validation error if user already exists 2022-02-11 21:32:37 +00:00
silverpill
0198a944ac Log successful login attempts 2022-02-11 20:40:56 +00:00
silverpill
49dc82fb0a Add decoding error type to VerificationError enum 2022-02-11 20:40:36 +00:00
silverpill
75fa39718c Add http_cors_allowlist configuration option 2022-02-10 23:35:23 +00:00
silverpill
6fc319f7dd Validate content of incoming Note objects 2022-02-09 13:53:11 +00:00
silverpill
2747e7b174 Add post character limit config option 2022-02-08 21:19:39 +00:00
silverpill
bf2e38a397 Add User-Agent header to fetcher requests 2022-02-08 19:51:40 +00:00
silverpill
f1fd0af6bc Remove blockchain_contract_name property from instance info 2022-02-08 18:32:54 +00:00
silverpill
0a2a145807 Optimize database queries in can_view_post() 2022-02-08 18:25:48 +00:00
silverpill
7d89f65b37 Hide posts that user is not allowed to view from search results 2022-02-08 18:00:30 +00:00
silverpill
a63da82b85 Allow cross-origin requests from localhost in production environment
https://codeberg.org/silverpill/mitra/issues/5
2022-02-08 13:16:46 +00:00
silverpill
b03b6e52aa Return empty array in response to pinned statuses query
https://codeberg.org/silverpill/mitra/issues/6
2022-02-08 01:30:58 +00:00
silverpill
9591be4df0 Use Pleroma-compliant instance version in /api/v1/instance
https://codeberg.org/silverpill/mitra/issues/4
2022-02-08 01:13:21 +00:00
silverpill
d9f0095787 Allow to reply to public post with a direct message 2022-02-07 01:06:18 +00:00
silverpill
9330038141 Add "subscribers-only" post visibility setting 2022-02-06 12:05:20 +00:00
silverpill
71fc2d9dad Save subscription state to database when processing blockchain event 2022-02-06 12:05:14 +00:00
silverpill
4e49f113e7 Add subscription relationship type 2022-02-05 23:53:01 +00:00
silverpill
a095ea7061 Add periodic task that monitors subscription events 2022-02-05 23:52:56 +00:00
silverpill
4e0f14df4c Add API method for getting authorization of paid subscription setup transaction 2022-02-05 23:51:12 +00:00
silverpill
464d4886fa Add wallet address to data returned by /api/v1/accounts/{account_id} method 2022-02-05 23:51:12 +00:00
silverpill
a3a0a6053d Add relationship type column to relationship table 2022-02-03 00:15:52 +00:00
silverpill
7de7f7a501 Refactor get_relationship function and optimize SQL query 2022-02-02 21:56:34 +00:00
silverpill
a81d0ef216 Remove get_relationships function and use get_relationship instead 2022-02-02 21:31:40 +00:00
silverpill
548e000b3e Add test for get_relationship function 2022-02-02 19:55:01 +00:00
silverpill
9f1f950aa3 Validate wallet address when logging in 2022-02-01 23:56:58 +00:00
silverpill
7e5917a821 Enable search by wallet address 2022-01-31 23:45:15 +00:00
silverpill
4797bacf32 Refactor search::helpers module 2022-01-31 23:27:59 +00:00
silverpill
333f90e293 Validate wallet address when creating new user 2022-01-31 19:10:51 +00:00
silverpill
dfc9902092 Move get_nft_contract function to ethereum::contracts module
Preparing for more contracts.
2022-01-30 17:47:07 +00:00
silverpill
c4a0f12555 Keep "pre" and "code" tags when cleaning post content 2022-01-28 00:42:36 +00:00