Commit Graph

110 Commits

Author SHA1 Message Date
Alec Murphy
022fceb21b Slon/Api/V1/Notifications: Add initial support for Notifications 2025-03-20 09:54:24 -04:00
Alec Murphy
bd8c5009fc Slon/Endpoints/Get/ActivityPub: Properly check for JSON in Accept header
Unlike whatever the hell I was thinking with 5f2ed89, sleep deprivation,
maybe? Oh well.
2025-03-19 12:38:24 -04:00
Alec Murphy
128d7d4f3a Slon/Modules/ActivityPub: Use NULL account_id for status lookup
Fixes regression introduced by a5460ec
2025-03-17 23:52:09 -04:00
Alec Murphy
0a3e307916 Slon/Modules/ActivityPub: Increment replies_count on local status when receiving replies 2025-03-17 18:14:52 -04:00
Alec Murphy
a5460ece4b Slon/Modules/ActivityPub: Use @slon_api_find_status_by_uri to handle receiving replies to statuses 2025-03-17 17:45:30 -04:00
Alec Murphy
ffc37f220a Slon/Static/html/user: Display Boosted statuses in user's timeline web view 2025-03-17 17:36:20 -04:00
Alec Murphy
966be78422 Slon/Api/V1/Polls: Implement Polls
Fixes #8
2025-03-16 19:21:44 -04:00
Alec Murphy
9a2a68ef93 Slon/Modules/Db: Load/save votes 2025-03-16 10:04:18 -04:00
Alec Murphy
8fc990670b Slon/Modules/ActivityPub: Create Poll object if present
This creates a poll for a status received via ActivityPub, partially
implementing #8
2025-03-16 08:45:53 -04:00
Alec Murphy
35ff50746c Slon/Api/V1/Statuses: Implement Boosts
Fixes #4
2025-03-15 20:28:04 -04:00
Alec Murphy
57ab5d1d1f Slon/Modules/ActivityPub: Translate Announce requests to Boosts
When we receive an Announce from someone we are following, we will
lookup and/or create the author of the boosted status, followed by the
status itself, which will be attached to a new status from the followed
user as a "reblog" object. Partially implements #4.
2025-03-15 18:22:48 -04:00
Alec Murphy
5d7efab319 Meta: Suppress compiler warning 2025-03-15 18:10:21 -04:00
Alec Murphy
c4ec8ae999 Slon/Modules/ActivityPub: Add http_signature_is_always_valid option
For testing purposes, we can set http_signature_is always_valid to any
value in the db settings Object. This allows us e.g. to replay
ActivityPub payloads using curl, without having to deal with signatures
while we are implementing new features.
2025-03-15 18:02:47 -04:00
Alec Murphy
8175debbac Meta: Remove newline for debugging separator 2025-03-15 17:52:31 -04:00
Alec Murphy
400d9c9c01 Slon/Api/V1/Bookmarks: Implement Bookmarks
Fixes #10
2025-03-14 18:24:10 -04:00
Alec Murphy
5a9bf4f32b Slon/Api/V1/CustomEmojis: Implement Custom Emojis
Fixes #6
2025-03-13 15:50:48 -04:00
Alec Murphy
a4a959d875 Meta: Suppress compiler warnings 2025-03-12 20:49:05 -04:00
Alec Murphy
401035a0d1 Slon/Api/V1/Favourites: Implement Favourites
Fixes #7
2025-03-12 20:33:39 -04:00
Alec Murphy
475e648feb Slon/Api/V1/Announcements: Implement Announcements
Fixes #9
2025-03-12 16:19:00 -04:00
Alec Murphy
6e9f86b4ae Slon/Modules/Db: Show progress when loading profiles and statues 2025-03-12 13:41:05 -04:00
Alec Murphy
fd8d6ca2b7 Slon/Modules/ActivityPub: Fix offset for HTTP signatures (for now) 2025-03-12 09:05:42 -04:00
Alec Murphy
c726b7e206 Slon/Http/AdminServer: Display free memory in /info/stats 2025-03-12 08:23:41 -04:00
Alec Murphy
06c8433616 Slon/Static/html/admin: Make whitelist_ip a protected settings field
Just a simple QoL change, not "security" by any means.
2025-03-12 08:03:25 -04:00
Alec Murphy
5f2ed89f61 Slon/Endpoints/Get/ActivityPub: Match json anywhere in Accept header
We shouldn't 404 if a client accepts many different content-types, or is
unnecessarily verbose, when requesting a user profile.
2025-03-12 07:58:44 -04:00
Alec Murphy
3faed0e966 Slon/Modules/OAuth: Return client state for /oauth/verify_access
Most clients don't care about this, but the (deprecated) Tooot iOS app
does, so now we support it.
2025-03-12 07:47:09 -04:00
Alec Murphy
5010de73a0 Slon/Api/V1/Accounts: Fix nested for loops in @slon_api_v1_accounts_get 2025-03-10 09:12:05 -04:00
Alec Murphy
ba296cceb8 Slon/Api/V1/Accounts: Create relationship object in session's mem_task
This fixes a crash when the Mona iOS client makes a GET request to the
/api/v1/accounts/relationships endpoint.
2025-03-10 08:21:40 -04:00
Alec Murphy
08579df0b8 Slon/Modules/Http: Add mem_task to SlonHttpSession
We should be using the CHeapCtrl from the Spawned @slon_http_task to
allocate memory for each individual session, which will automatically
be freed when the CTask dies, so let's give ourselves the ability to
do that.
2025-03-10 08:18:13 -04:00
Alec Murphy
546cbaf18d Slon/Modules/Api: Add NULL check to SLON_AUTH_ACCOUNT_ID macro 2025-03-09 20:34:45 -04:00
Alec Murphy
d5a09373e4 Everywhere: Update JSON API 2025-03-09 19:39:44 -04:00
Alec Murphy
b0c1016955 Slon/Modules/ActivityPub: Pass actor as argument to @slon_activitypub_get_account_for_remote_actor 2025-03-06 15:09:57 -05:00
Alec Murphy
74455c59ab Slon/Modules/Db: Add @slon_db_save_status_to_disk() to save an individual account's statuses 2025-03-06 15:03:05 -05:00
Alec Murphy
aded79c192 Slon/Modules/Db: Save/load accounts to/from individual JSON files 2025-03-06 10:54:25 -05:00
Alec Murphy
64f31de070 Everywhere: Use slon_mem_task for memory allocation 2025-03-06 09:54:26 -05:00
Alec Murphy
5333b64917 Everywhere: Store statuses by account id, generate timelines as array of object:account_id,status_id 2025-03-05 13:43:35 -05:00
Alec Murphy
33a92718c7 Slon/Api/V1/Accounts: Handle array of ids for /api/v1/accounts/relationships 2025-03-05 13:04:22 -05:00
Alec Murphy
62b6d75851 Slon/Modules/Api: Use @slon_api_find_status_by_id 2025-03-05 08:09:17 -05:00
Alec Murphy
b8fba64ab0 Slon/Api/V1/Accounts: Allow updating avatar/header images via PATCH /api/v1/accounts/update_credentials 2025-03-04 20:46:43 -05:00
Alec Murphy
3100707e78 Slon/Api/V2/Media: Remove unnecessary no_warn 2025-03-04 20:14:26 -05:00
Alec Murphy
f1d78783a3 Slon/Endpoints/Get/Web: Remove some test data 2025-03-04 15:12:49 -05:00
Alec Murphy
9ed7e1c1e3 Slon/Http/Server: Use @slon_http_json_object_add_nested_value() when
parsing url-encoded strings to JSON

Fixes #3
2025-03-04 14:45:12 -05:00
Alec Murphy
a7649a00c8 Everywhere: Use Catbox API asynchronously
Fixes #2
2025-03-04 13:26:35 -05:00
Alec Murphy
04dce33aca Slon/Modules/Api: Move Catbox API routines here 2025-03-03 21:12:33 -05:00
Alec Murphy
e1c6ca1b2b Slon/Http/Server: Reimplement multipart/form-data to JSON parser 2025-03-03 21:00:55 -05:00
Alec Murphy
8eddf1fdc7 Slon/Static/html,js: Let IMG tags know width,height from status' media attachments 2025-03-02 19:58:34 -05:00
Alec Murphy
5258ab19a8 Slon/Api/V1/Statuses: Allow retrieval of individual status from public timeline 2025-03-02 18:07:09 -05:00
Alec Murphy
715d119882 Slon/Api/V1/Statuses: Implement Context descendants
Fixes #1
2025-03-02 17:34:59 -05:00
Alec Murphy
27fa0f8aad Slon/Api/V2/Media: Add support for Catbox API 2025-03-02 15:08:39 -05:00
Alec Murphy
6ff3a74914 Slon/Modules/Db,Slon/Http/AdminServer: Add a settings object to the database for misc parameters 2025-03-02 09:55:22 -05:00
Alec Murphy
6f11f7830d Slon/Api/V1/Statuses: Handle 'sensitive' parameter if POSTed as string rather than boolean 2025-03-01 21:27:09 -05:00