Commit graph

316 commits

Author SHA1 Message Date
Laura Hausmann
c9b9a8e45b
[backend] Switch to TimeSpan extension method for easier code readability 2024-10-30 18:27:18 +01:00
Laura Hausmann
90a6b06410
[backend/api] Fix race condition causing simultaneous DbContext access in NotificationRenderer 2024-10-27 18:12:17 +01: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
a37d4c141d
[backend/api] Return stripped reply data in note descendants endpoint 2024-10-24 18:20:48 +02:00
Laura Hausmann
4b5d76961f
[backend/api] Add PaginationWrapper<TData> & associated helper methods 2024-10-24 18:20:48 +02:00
Laura Hausmann
55530f482d
[backend/api] Add pagination data to note likes and note renotes responses 2024-10-24 18:20:48 +02:00
Laura Hausmann
e4074dddbc
[backend/core] Allow manual resetting of the home timeline heuristic 2024-10-24 16:48:06 +02:00
pancakes
30ff0d77b2 [backend/api] Add bite back endpoint 2024-10-23 05:04:55 +02:00
pancakes
3218de9f56 [backend] Implement RenderBite, BiteService and endpoints for note and user 2024-10-23 05:04:55 +02:00
Laura Hausmann
4821750dbb
[backend] Code cleanup 2024-10-19 03:03:52 +02:00
Laura Hausmann
0f22bbdbcb
[parsing] Add cw search filter expression (ISH-517) 2024-10-19 03:00:43 +02:00
Laura Hausmann
6124eadb53
[backend/drive] Add storage cleanup startup command 2024-10-18 23:18:45 +02:00
Laura Hausmann
9275e3b21a
[backend/drive] Add fixup-media startup command (ISH-520) 2024-10-18 22:43:25 +02:00
Laura Hausmann
3a346d5a22
[backend/razor] Add admin dashboard (Admin-FE)
Currently available sections: instance metadata, user management, federation control, relays, plugins & queue dashboard.
Planned: sections: configuration, logs, policies & reports.
2024-10-11 05:41:52 +02:00
kopper
8998cd2874
[backend] Also search in alt text 2024-10-09 18:31:16 +02:00
Laura Hausmann
dc77c48005
[backend/core] Allow configuring arbitrary reject/rewrite policies, add default configuration values to all policies (ISH-16) 2024-10-09 05:46:18 +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
b5ad7649ea
[backend/startup] Remove debug code 2024-10-06 00:07:44 +02:00
Laura Hausmann
d62ac94d5e
[backend/core] Fix migrations that move more than 50 followers failing 2024-10-05 23:46:09 +02:00
Laura Hausmann
c1e348b0d5
[backend/asp] Increase JsonSerializer MaxDepth to 256
200 is the maximum required by the note descendants/ascendants tree, so 256 is that + some margins. Cycle detection is unaffected by this change.
2024-10-03 00:47:30 +02:00
Laura Hausmann
9d1a21e2d9
[backend/razor] Move public preview to Blazor SSR (razor components) 2024-10-02 02:17:51 +02:00
Laura Hausmann
7662c28745
[backend/database] Canonicalize punycode host representations to lowercase 2024-10-02 01:16:25 +02:00
Laura Hausmann
df26db0585
[backend/federation] Add relay support (ISH-266) 2024-09-28 00:32:43 +02:00
Laura Hausmann
f1b7218c60
[backend/api-shared] Fix typo 2024-09-27 19:52:41 +02:00
Laura Hausmann
5192b58150
[backend/api-shared] Also filter renotes & quotes mentioning muted/blocked users 2024-09-27 19:50:39 +02:00
Laura Hausmann
9d18a145ed
[backend/core] Fix typo 2024-09-26 02:52:14 +02:00
Laura Hausmann
c68e0bbd94
[backend/core] Fix AsChunkedAsyncEnumerable pagination 2024-09-26 02:14:20 +02:00
Laura Hausmann
9789c8452e
[backend/razor] Show login button when displaying public preview disabled error page 2024-09-24 02:36:29 +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
2bf714b8e1
[backend/core] Fix typo 2024-09-23 00:47:43 +02:00
Laura Hausmann
1d9864a214
[backend/federation] Handle incoming ASMove activities (ISH-118) 2024-09-23 00:21:57 +02:00
Laura Hausmann
9f2cb34d0e
[backend/razor] Add basic user page public preview, handle user id redirects correctly 2024-09-16 00:53:23 +02:00
Laura Hausmann
892da3a473
[backend/startup] Exit if started with --migrate and no migrations are pending 2024-09-15 21:35:40 +02:00
Kopper
83e830b5df
[backend/configuration] Add configuration for backfill of note replies 2024-09-15 02:05:18 +02:00
Kopper
8c1a635027
[backend/federation] Refactor collection iteration
Collection iteration is extracted into a seprate IAsyncEnumerable from
the currently only place where it happens. This is in preparation for
handling paginated collections.
2024-09-15 01:47:40 +02:00
Laura Hausmann
079dd8a8e5
[backend/configuration] Set base path to working directory instead of assembly dir 2024-09-13 21:56:33 +02:00
Laura Hausmann
afe62b0aab
[sln] Code cleanup 2024-09-13 21:44:31 +02:00
Kopper
9d6d892091 [backend/akko-client] Fix notifications, including emoji reaction notifications 2024-09-13 17:30:05 +02:00
Laura Hausmann
173fbfb835
[backend/asp] Return error responses as HTML/XML/JSON depending on accept header 2024-08-16 01:00:43 +02:00
Laura Hausmann
91a7b2554f
[backend/logging] Add LOG_TIMESTAMPS environment variable 2024-08-14 04:40:55 +02:00
Laura Hausmann
fbebc91983
[backend/logging] Allow colorful systemd output
Since journalctl strips them by default, there's no reason not to include them for compatibility reasons. This change also simplifies the custom logger code greatly.
2024-08-14 04:25:11 +02:00
Laura Hausmann
4f98fa8461
[backend/federation] Fix possibly unbounded UserResolver recursion 2024-08-14 03:44:14 +02:00
Laura Hausmann
92f957a536
[backend/federation] Use content negotiation for host-meta responses 2024-08-14 03:23:25 +02:00
Laura Hausmann
b37f02846b
[backend/federation] Add support for returning xrd+xml WebFinger responses for local users 2024-08-14 02:01:56 +02:00
Laura Hausmann
dba3fc1a6a
[backend/core] Add request/job id to logs, improve log formatting 2024-08-13 20:47:06 +02:00
Laura Hausmann
649fc267c8
[backend/core] Fix typo 2024-08-13 04:50:18 +02:00
Laura Hausmann
3132b6b8c9
[backend/core] Fix note thread mute handling inconsistencies 2024-08-13 03:11:09 +02:00
Laura Hausmann
67a62fadc9
[backend/drive] Move ImageProcessor.cs into the ImageProcessing subfolder 2024-08-12 03:21:04 +02:00
Laura Hausmann
e379ff3f60
[backend/configuration] Add config validation for the image processing pipeline 2024-08-12 03:21:04 +02:00