Commit Graph

266 Commits

Author SHA1 Message Date
Paul Wilde
9568ec8bfe cleanup 2024-01-28 21:04:11 +00:00
Paul Wilde
253e627ee0 make compatible with subway tooter app 2024-01-28 20:55:43 +00:00
default
40076e969c mastoapi: avoid crashing on empty payloads. 2024-01-26 19:01:59 +01:00
default
2d4860d57e Use get_attachments() in mastoapi_status(). 2024-01-24 19:58:51 +01:00
default
581b0764fe Fixed typo. 2024-01-23 16:28:52 +01:00
default
8f34c2e740 mastoapi: added /v1/statuses put support (note edit). 2024-01-23 16:21:48 +01:00
default
f5031ede27 mastoapi: added support for status/.../source. 2024-01-23 15:40:25 +01:00
default
49d707078b Mastoapi: fixed an error the edited_at field. 2024-01-19 09:35:42 +01:00
default
65040b65a3 New function get_atto(), to get the attributedTo field. 2024-01-18 23:04:37 +01:00
default
9185cc4baa Minor tweak for better corruption detection. 2024-01-12 11:03:29 +01:00
default
5532a3e8bd More tries to fix crashes in mastoapi_account(). 2024-01-11 21:33:41 +01:00
default
adf5623044 Avoid invalid actors in mastoapi_status(). 2024-01-11 20:20:01 +01:00
default
f7015019d3 Silenced some unused argument warnings. 2024-01-11 18:55:09 +01:00
default
eaeb776446 Set the 'bot' field in verify_credentials to the matching value. 2024-01-11 18:49:26 +01:00
James Seward
c3fb6bab77 Support DELETE for Mastodon subscriptions
While testing Mona, I noticed that after deleting my account entry for
my snac server, Mona would repeatedly try to delete the subscription it
thought it had created, resulting in many unhandled DELETE calls.

This accepts the call and returns 200 for it, which makes Mona happy.
2024-01-11 13:38:08 +00:00
James Seward
ca27d0248a Add missing fields to account verification
This allows the Mona iOS app to successfully sign in.

I wasn't sure what a suitable value for `last_status_at` would be so I
just copied `published` since it's the right format.

This also just sets the `bot` field to false regardless of the user's
configuration, which probably isn't ideal.
2024-01-11 13:36:16 +00:00
default
cc535e9958 Added more webfinger checks, just to be sure. 2024-01-10 19:23:34 +01:00
default
755d997fb1 Updated copyright year. 2024-01-04 09:22:03 +01:00
default
af912dba0b actor_request() accepts again an optional snac argument. 2023-12-17 19:53:54 +01:00
default
c06b74cc8e Revert "Reverted actor_request() without user."
This reverts commit 8d0a69cd75.
2023-12-11 10:12:57 +01:00
default
8d0a69cd75 Reverted actor_request() without user.
Some sites require even Person requests to be signed.
2023-12-11 08:00:49 +01:00
default
0e6c5f9463 actor_request() does not need a user argument. 2023-12-10 17:46:54 +01:00
default
01c21d57ec mastoapi: fixed crash processing kbin boosts. 2023-12-05 19:37:27 +01:00
default
756b0c98ee mastoapi: correctly print the auth key in the sepcial urn:ietf... case. 2023-12-05 05:47:53 +01:00
default
f1afe4416d Fill the 'fields' list in mastoapi_account(). 2023-12-03 10:57:54 +01:00
default
f5bf8ef7e1 mastoapi: patched dates to match the funny timezone Mastodon uses. 2023-12-03 10:05:04 +01:00
default
68b7947159 mastoapi: return some dummy values in verify_credentials. 2023-12-03 09:24:02 +01:00
default
80c5bac826 Backport from xs. 2023-11-17 08:51:53 +01:00
default
b199f223e4 Tag indexes are also purged. 2023-11-08 18:15:51 +01:00
default
5e8eb5f171 mastoapi: implemented /api/v1/accounts/lookup. 2023-10-28 07:10:21 +02:00
default
b7d0f297c3 mastoapi: Don't exclude posts of type Page or Article. 2023-10-16 20:49:58 +02:00
default
8018f8c1d4 Fixed crash. 2023-10-16 18:40:43 +02:00
default
3b88cfe992 Fixed bug that crashed Tusky. 2023-10-13 09:29:55 +02:00
default
3385bda618 Minor URI tweak. 2023-10-13 09:14:11 +02:00
default
7c1550e566 mastoapi: boosted posts by others are correctly returned. 2023-10-13 09:01:07 +02:00
default
b08d455295 mastoapi: show any boosted note, not only by us. 2023-10-13 08:33:57 +02:00
default
39932b21ec mastoapi: also process "Document" type attachments. 2023-10-09 22:56:11 +02:00
default
1b3f768a57 mastoapi: some tweaks to better match the returned data in timelines. 2023-10-09 11:49:45 +02:00
default
8524ace23f Hide posts from the public web for accounts with 'private' == true. 2023-10-08 00:06:37 +02:00
default
c314e995a4 Backport from xs. 2023-09-25 18:25:09 +02:00
Kelson Vibber
3931640b69 Put hostname in OAuth page title for web-based clients like Elk 2023-09-21 01:16:13 +00:00
Kelson Vibber
d9b6688e03 Add title to OAuth page for web-based clients like Elk 2023-09-21 01:12:28 +00:00
Kelson Vibber
03f956b14e Explicitly support dark mode to fix mismatched colors in clients like Tusky 2023-09-21 01:03:57 +00:00
default
e14ad56994 mastoapi: Added fields list in verify_credentials. 2023-09-18 11:57:55 +02:00
default
0ee61d53d4 mastoapi: ensure attachment and tag lists are tags. 2023-08-25 07:47:18 +02:00
default
4bc619e2fc mastoapi: process tag lists that are not lists correctly. 2023-08-23 18:32:08 +02:00
default
cf0aa96a35 mastoapi: some tweaks for posts from lemmy. 2023-08-20 16:03:46 +02:00
default
93bdf79eb6 mastoapi: in instance, return the list of supported mime types from the internal list. 2023-08-17 18:06:36 +02:00
default
d26b31ed1d mastoapi: minor fix in verify_credentials. 2023-08-16 18:18:46 +02:00
default
2bea378610 mastoapi: Some tweaks to process posts with 'name' and 'image' fields. 2023-08-14 20:11:03 +02:00
default
3d2d75315e mastoapi: show the instance's title and short_description, if they exist. 2023-08-14 11:31:11 +02:00
default
2f0d604f0c More mastoapi tweaks. 2023-08-13 13:00:36 +02:00
default
a0906208ea Use some new xs_stock values. 2023-08-13 12:09:35 +02:00
default
b2920e9956 Added avatar_static to validate_credentials object. 2023-08-12 21:53:35 +02:00
default
07be3721c1 Some mastoapi tweaks to support the semaphore.social web client. 2023-08-12 21:46:54 +02:00
default
ee31fa4bae Fixed crash. 2023-08-12 18:42:11 +02:00
default
d48819ded8 Some mastoapi instance object tweaks. 2023-08-12 18:38:55 +02:00
default
72839e59a0 mastoapi: fixed /api/timelines/public to not need a bearer token. 2023-08-12 12:10:42 +02:00
default
cac1c6febd Rewritten actor_get() to not depend on a user. 2023-08-12 11:23:01 +02:00
default
499697258d Rewritten is_msg_public() to not depend on a user. 2023-08-12 09:43:01 +02:00
default
574c0ca8af Fixed some mastoapi minor errors. 2023-08-10 19:37:33 +02:00
default
3e5bb109d1 Renamed json dump functions to new xs spec. 2023-08-08 19:29:34 +02:00
default
15f755960b Added xs_json_load() wherever possible. 2023-08-05 14:56:07 +02:00
default
f5a3dbf8d6 Use xs_json_dump_pp() wherever possible. 2023-08-03 09:02:08 +02:00
default
0f8c0cd694 Updated comment in headers. 2023-07-28 11:34:18 +02:00
default
d1add0598a In mastoapi, notes can be pinned / unpinned. 2023-06-28 20:36:33 +02:00
default
15684721c3 Added some lost fields in mastoapi_status(). 2023-06-28 19:53:25 +02:00
default
9a47a7c2d1 Don't discard notes from people we don't follow in mastoapi. 2023-06-28 19:16:58 +02:00
default
478cb2cf15 Use xs_stock_* values wherever possible. 2023-06-15 17:51:24 +02:00
default
3977a12bef Avoid writing a NULL header in mastoapi_account(). 2023-06-12 19:39:15 +02:00
Haijo7
42958900a0
removed additinal empty string 2023-06-12 19:01:38 +02:00
Haijo7
564b5b1161 add mastodon profile header to mastodon api 2023-06-12 10:42:59 +02:00
Haijo7
9b1c5cc843
set bot to true in mastodon account if user type is service 2023-06-11 16:53:50 +02:00
Haijo7
2544ec92b2
add user type to mastodon profile 2023-06-11 16:38:06 +02:00
poesty
fb5f34bb5a Only allow logged-in user to use statuses API 2023-06-11 12:06:37 +08:00
poesty
15137fc5c7 Only allow logged-in user to use search API 2023-06-11 03:04:08 +08:00
poesty
2b64892e83 Use MID_TO_MD5 for ID comparison 2023-06-10 14:35:16 +08:00
poesty
56c44eb455 Ignore non-followed users' notes without boosts in private timeline 2023-06-10 14:07:58 +08:00
poesty
86198549e7 Ignore timestamps in mastoapi_id when filtering entries 2023-06-10 02:39:11 +08:00
default
fafdbbf815 Replaced usage of random() with xs_rnd_buf(). 2023-06-05 18:29:25 +02:00
default
513d81c694 Now you can vote from the mastoapi. 2023-06-01 08:40:08 +02:00
default
182ba33c76 Minor refactoring to mastoapi_poll(). 2023-06-01 08:13:58 +02:00
default
3b72b0f0ac New function was_question_voted(). 2023-05-31 22:06:31 +02:00
default
796a111de8 New function mastoapi_poll(). 2023-05-31 18:35:50 +02:00
default
bec8e88fb9 Started voting on mastoapi (non-working). 2023-05-31 11:13:06 +02:00
default
a3eb84b932 Fixed poll id in mastoapi. 2023-05-31 10:57:06 +02:00
default
96481a3836 Don't show votes to polls as descendants in mastoapi. 2023-05-31 10:51:37 +02:00
default
db1bc858a1 Votes are shown in mastoapi. 2023-05-31 10:49:08 +02:00
default
bcc2eb6234 Show the finished poll notification correctly in mastoapi. 2023-05-30 15:01:45 +02:00
default
654e171b93 New macro ISO_DATE_SPEC. 2023-05-29 09:07:27 +02:00
default
ec1ee8a137 Added the missing field "header" to mastodon acoount. 2023-05-27 13:43:50 +02:00
default
bf6fcee21c In mastoapi, don't show poll votes in timelines. 2023-05-24 14:12:21 +02:00
default
d4695a9cbb Mastoapi: added block / unblock. 2023-05-18 09:46:21 +02:00
default
970ad7a540 Got rid of xs_encdec.h. 2023-05-17 10:08:57 +02:00
default
81cec4ab27 Don't autocomplete local users if they are already added. 2023-05-17 08:03:46 +02:00
default
9bc10da8a5 In mastoapi account search, return local users at the end. 2023-05-17 07:27:08 +02:00
default
e6eb1adc65 Also find local users in /api/v1/search. 2023-05-15 13:04:30 +02:00
default
3e1944abbf Deleted repeated code. 2023-05-15 11:38:29 +02:00
default
40fa322c54 mastoapi_account() returns the acct field as user@host. 2023-05-15 11:36:09 +02:00
default
bcf267075d Made mastoapi account search case-insensitive. 2023-05-15 11:28:59 +02:00