Commit graph

363 commits

Author SHA1 Message Date
Laura Hausmann
b70de11da8
[backend/masto-client] Deduplicate filter matches by filter id 2025-01-01 02:12:01 +01:00
Laura Hausmann
9865f3dde7
[backend/core] Replace MFM line endings during user/note ingestion
This saves significant amounts of time & memory during parsing.
2024-12-15 00:11:31 +01:00
Kopper
149fae3363
[backend] address review 2024-12-13 22:19:31 +01:00
Kopper
1e1364e2bb
[backend/masto-client] Add feature flag for inline media 2024-12-13 22:19:31 +01:00
Kopper
89060599eb
[backend] Implement inline media
Inline media can be created by:

1. Attach media to note as usual
2. Copy media URL (public one, for remote instances)
3. Use the new $[media url ] MFM extension to place it wherever you
   wish. (The trailing space is necessary as the parser currently
   treats the closing ] as a part of the URL)

The Iceshrimp frontend may make this easier later on (by having a
"copy inline MFM" button on attachments, maybe?)

Federates as <img>, <video>, <audio>, or <a download> HTML tags
depending on the media type for interoperability. (<a download> is
not handled for incoming media yet).

The media will also be present in the attachments field, both as a
fallback for instance software that do not support inline media,
but also for MFM federation to discover which media it is allowed to
embed (and metadata like alt text and sensitive-ness). This is not
required for remote instances sending inline media, as it will be
extracted out from the HTML.

The Iceshrimp frontend does not render inline media yet. That is
blocked on #67.
2024-12-13 22:19:30 +01:00
Laura Hausmann
f013520b84
[backend] Remove unused import 2024-12-12 00:41:24 +01:00
Laura Hausmann
7dc3143089
[backend/masto-client] Return attachment metadata when available (ISH-657) 2024-12-12 00:34:34 +01:00
Laura Hausmann
55943bacc6
[backend/streaming] Echo back specified WebSocket protocol for mastodon streaming connections when set (ISH-635) 2024-12-06 18:55:37 +01:00
Laura Hausmann
00e157cc7e
[parsing] Switch to MfmSharp 2024-12-06 18:14:00 +01:00
Laura Hausmann
c0e8a6d680
[backend/streaming] Fix streaming updates not containing html markup if supported 2024-11-20 02:36:32 +01:00
Laura Hausmann
862d477dec
[backend/masto-client] Remove confusing status context logic
This does technically match Mastodon's behavior, but it doesn't match the behavior of iceshrimp-js, or the Iceshrimp.NET web API. It's also very confusing.
2024-11-20 01:56:41 +01:00
Laura Hausmann
51e4846635
[backend/core] Revert Task.ContinueWithResult naming 2024-11-20 01:14:50 +01:00
Laura Hausmann
24b412bd75
[sln] Reformat code 2024-11-20 00:48:29 +01:00
Laura Hausmann
7dec2514da
[sln] Apply code style 2024-11-20 00:48:29 +01:00
Laura Hausmann
4356a47b9d
[backend/asp] Make services runtime-discoverable 2024-11-18 19:02:44 +01:00
Laura Hausmann
3b8a4b89a9
[backend/openapi] Replace ConsumesHybrid condition with FromHybrid 2024-11-18 19:02:43 +01:00
Kopper
40b35a7bd2 [backend/akko-client] Handle "local" visibility (ISH-559) 2024-11-06 13:06:18 +03:00
pancakes
43307d655f
[backend] Don't include UserProfile 2024-11-03 12:41:43 +10:00
pancakes
e10fafa805
[backend/masto-client] Add accounts/{id}/remove_from_followers 2024-11-03 12:19:33 +10:00
Laura Hausmann
f2853d2d40
[backend] Fix typo 2024-11-02 22:56:52 +01:00
Laura Hausmann
e391aebce5
[backend] Consistently enforce https URIs 2024-10-29 18:43:58 +01:00
Laura Hausmann
dc7e45c7cb
[backend/masto-client] Fix StatusController quote lookup precedence 2024-10-29 16:14:54 +01:00
Laura Hausmann
7aec669d73
[backend] Code cleanup 2024-10-25 06:49:28 +02:00
5a63787c39 [backend] refactor mastoapi bitecontroller routes 2024-10-25 01:44:54 +02:00
0a8b7dbf7a [backend] add mastoapi routes for biting notes and biting back users, add alternate route for biting users, and fix biting through mastoapi 2024-10-25 01:44:54 +02:00
kopper
27ac36d747
[backend] Add config option to sign reply backfills with requesting user
Signed-off-by: Laura Hausmann <laura@hausmann.dev>
2024-10-24 21:18:58 +02:00
kopper
7173373330
[backend/federation] Improved reply backfill
Instead of backfilling every note we come across that has a reply
collection, only schedule a backfill job if someone wants to see the
replies (on GET MastoAPI /context, or Iceshrimp API /descendants)

Reply backfilling is also done on a ThreadIdOrId basis as opposed to the
previous way of backfilling individual notes. This allows us finer
grained control over the recursion and frees up the job queue, alongside
allowing for easier implementation of context collection backfill in the
future (by mapping each context collection to a thread)

---

Currently, note threads are implicit based on the "threadId" column of a
note, which can be null (where it's the same as the note's "id")

This commit turns note threads into an actual entity, and as a part of
that, makes "threadId" non-nullable (by specifically setting it to "id"
for those cases)

This is done to attach extra metadata to the entire thread, currently
just the time of when it was last backfilled, but more may be added in
the future (the context collection associated with this thread, for example)

---

The data format for backfill jobs have backwards-incompatibly changed
since the introduction of the feature. We can drop all old jobs without
causing too much trouble as they will be re-scheduled on demand

---

Signed-off-by: Laura Hausmann <laura@hausmann.dev>
2024-10-24 21:18:57 +02:00
Laura Hausmann
f19a414b27
[backend/federation] Refactor UserResolver (ISH-548) 2024-10-24 01:48:09 +02:00
Laura Hausmann
e753bacb1d
[backend] Code cleanup 2024-10-24 01:41:49 +02:00
pancakes
13955e7efe [backend/masto-client] Move Bite from Pleroma to Mastodon 2024-10-23 05:04:55 +02:00
pancakes
8cbca253e8 [backend/masto-client] Add Bite extension 2024-10-23 05:04:55 +02:00
Laura Hausmann
365c3f6f1d
[backend/api] Make avatar/banner updates user the files' AccessUrls instead of the Urls 2024-10-13 04:52:37 +02:00
Laura Hausmann
a5a2c0b169
[backend/core] Add basic reject policies, along with a highly extensible system for rewrite policies (ISH-16) 2024-10-09 04:34:23 +02:00
Laura Hausmann
304d9f2750
[backend/masto-client] Enforce RestrictedNoMedia public preview mode 2024-09-24 01:02:05 +02:00
Laura Hausmann
1c2079e1ee
[backend] Rework GracefulException throws without additional detail 2024-09-24 00:45:18 +02:00
Laura Hausmann
afe62b0aab
[sln] Code cleanup 2024-09-13 21:44:31 +02:00
Laura Hausmann
3ec05df62f
[backend/masto-client] Don't report git revision to mastodon clients 2024-09-13 18:20:31 +02:00
Kopper
6d8c686401 [backend/akko-client] Expose quote notifications as mention notifications
This is a bit difficult of a situation as Akkoma does not have quote
notifications. This is the closest thing we have and the frontend seems
to handle it well.
2024-09-13 17:30:05 +02:00
Kopper
7cd5f0776b [backend/akko-client] Cleanup and reformat 2024-09-13 17:30:05 +02:00
Kopper
7518cf7422 [backend/akko-client] Handle websocket ping 2024-09-13 17:30:05 +02:00
Kopper
e01e241fc7 [backend/akko-client] Un-break Moshidon 2024-09-13 17:30:05 +02:00
Kopper
bfa69933c5 [backend/akko-client] Fix reaction notifications for custom emoji 2024-09-13 17:30:05 +02:00
Kopper
bcb6382c73 [backend/akko-client] Fix context of boosts 2024-09-13 17:30:05 +02:00
Kopper
16c0cba1f4 [backend/akko-client] Attempt to fix reaction account IDs 2024-09-13 17:30:05 +02:00
Kopper
9d6d892091 [backend/akko-client] Fix notifications, including emoji reaction notifications 2024-09-13 17:30:05 +02:00
Kopper
30cf0db0fb [backend/akko-client] Un-break Enafore 2024-09-13 17:30:05 +02:00
Kopper
fefe599d32 [backend/akko-client] Add reaction endpoints 2024-09-13 17:30:05 +02:00
Kopper
0e7e2698e0 [backend/akko-client] Expose VAPID public key 2024-09-13 17:30:05 +02:00
Kopper
3fb8fea316 [backend/akko-client] Expose conversation ID 2024-09-13 17:30:05 +02:00
Kopper
410519dafa [backend/akko-client] Stub out preview flag to not accidentally spam people 2024-09-13 17:30:05 +02:00