Commit graph

211 commits

Author SHA1 Message Date
Laura Hausmann
df3e56f422
[backend/core] Prevent creation of pure renote replies 2025-02-19 16:37:11 +01:00
pancakes
dff87e9db5
[backend/api] Move Avatar and Banner queries onto single lines 2025-01-30 11:11:23 +01:00
pancakes
78550aa878
[backend/api] Simplify Avatar and Banner queries 2025-01-30 11:11:23 +01:00
pancakes
fa7c09c94b
[backend] Fix outgoing alt text federation 2025-01-30 11:11:23 +01:00
Laura Hausmann
77936b710d
[backend/federation] Fix future publishedAt/updatedAt DateTime handling 2025-01-20 11:18:38 +01:00
Laura Hausmann
1bb199bf59
[backend/federation] Make publish/update date checks stricter (ISH-687) 2025-01-19 09:59:43 +01:00
Laura Hausmann
9e37942e9d
[backend/federation] Improve hashtag handling (ISH-651) 2025-01-12 12:27:34 +01:00
Laura Hausmann
2fbff537a6
[backend/federation] Don't mark notes as edited during refetch (ISH-601) 2025-01-07 07:02:32 +01:00
Tamara Schmitz
27206633bb
[backend/core] don't schedule reply backfill jobs for followers only posts when authenticated user backfill is disabled 2025-01-05 06:38:12 +01:00
Laura Hausmann
cf37567108
[backend/core] Use the fetched object id as the lock key in NoteService.ResolveNoteAsync 2024-12-19 21:22:25 +01:00
Laura Hausmann
b8ba778842
[backend/core] Improve inline media lookup performance 2024-12-15 01:05:56 +01:00
Laura Hausmann
e8842d70a2
[backend/core] Fix runtime ArrayTypeMismatchException in NoteService 2024-12-15 00:36:19 +01:00
Laura Hausmann
010dd2bb96
[backend/core] Fix CW edits not being processed correctly, replace CW line endings during note ingest 2024-12-15 00:34:29 +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
b6953236c3
[backend/masto-client] Fix edits breaking 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
911480afcb
[backend] Remove unused imports 2024-12-11 19:58:52 +01:00
Laura Hausmann
5dee8bc783
[parsing] Bump MfmSharp version 2024-12-07 04:41:00 +01:00
Laura Hausmann
00e157cc7e
[parsing] Switch to MfmSharp 2024-12-06 18:14:00 +01:00
Kopper
36d9a8cc49
[backend/federation] Context collection 2024-11-23 18:20:41 +01:00
Laura Hausmann
fe8c736821
[backend/federation] Limit UserResolver invocations in NoteService (ISH-622) 2024-11-21 00:45:30 +01:00
Laura Hausmann
863c9ca9c9
[backend/federation] Improve actor & note validation (ISH-547) 2024-11-20 23:54:32 +01:00
Laura Hausmann
48bb81af1c
[backend/core] Deliver note creates & updates to reply author even if they're not mentioned 2024-11-20 01:30:56 +01:00
Laura Hausmann
a762a9201e
[backend/core] Revert IAsyncEnumerable naming 2024-11-20 01:12:32 +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
6c76b2b2c5
[backend] Switch params methods to IEnumerable<T> 2024-11-18 19:02:41 +01:00
Laura Hausmann
f2853d2d40
[backend] Fix typo 2024-11-02 22:56:52 +01:00
Laura Hausmann
912c50488f
[backend/core] Fix ResolveNoteMentionsAsync regression 2024-10-29 20:01:15 +01:00
Laura Hausmann
b43e81b834
[backend/federation] Switch to Uri.TryCreate local fetch checks 2024-10-29 18:43:58 +01:00
Kopper
90f1e30ef2 [backend] Fix reply backfill limiting 2024-10-26 07:24:39 +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
c55e673cd2
[backend/federation] Don't allow negative voter counts 2024-10-23 04:49:25 +02:00
Laura Hausmann
6f55afe60a
[backend/core] Improve poll voter count fallback
This should fix erroneous voter counts for polls from instances that don't return as:votersCount.
2024-10-16 22:07:26 +02:00
Laura Hausmann
3c96d98932
[backend/core] Only deliver create/update activities to remote users, unify DeliverToConditionalAsync calls 2024-10-16 20:51:40 +02:00
Laura Hausmann
a951217664
[backend/core] Don't retry jobs with like/unlike note resolution failures 2024-10-15 17:19:42 +02:00
Laura Hausmann
846888b2c7
[backend/core] Prevent system users from authenticating or creating notes 2024-10-09 21:39:36 +02:00
Laura Hausmann
5390990448
[backend/core] Add basic message rewrite policies (ISH-16) 2024-10-09 21:14:50 +02:00
kopper
8998cd2874
[backend] Also search in alt text 2024-10-09 18:31:16 +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
0962b07021
[backend/core] Catch errors in NoteService.ResolveNoteAsync
This fixes some inbox job failures, for example when a post quoting a deleted post is being ingested.
2024-10-06 14:04:06 +02:00
Laura Hausmann
13614c2201
[backend] Reformat code 2024-09-23 02:00:34 +02:00
Laura Hausmann
07ed0f5651
[backend/core] Enforce local-only for renotes & replies of local-only notes 2024-09-23 02:00:27 +02:00
Kopper
91aab7c8d6 [backend/federation] Limit the maximum number of replies to backfill per post 2024-09-18 18:27:14 +02:00
Kopper
7fd1f81d21 [backend/federation] Limit reply backfill to same instance by default 2024-09-18 18:27:14 +02:00
Kopper
48784690c1 [backend/federation] Do not queue backfill jobs that have reached their recursion limit 2024-09-18 18:27:14 +02:00