Commit graph

331 commits

Author SHA1 Message Date
Laura Hausmann
7dec2514da
[sln] Apply code style 2024-11-20 00:48:29 +01:00
Laura Hausmann
0ee5ff377e
[backend] Move OutputCacheMiddleware into UseCustomMiddleware to make the order more obvious 2024-11-18 19:20:23 +01:00
Laura Hausmann
4356a47b9d
[backend/asp] Make services runtime-discoverable 2024-11-18 19:02:44 +01:00
Laura Hausmann
705e061f74
[backend/asp] Refactor middleware stack
This commit splits the request pipeline conditionally instead of invoking every middleware in the stack.

It also simplifies middleware instantiation by using runtime discovery, allowing for Plugins to add Middleware.
2024-11-18 19:02:44 +01:00
Laura Hausmann
86762dc386
[backend/asp] Make BlazorSsrHandoffMiddleware less hacky 2024-11-18 19:02:43 +01:00
Laura Hausmann
3b8a4b89a9
[backend/openapi] Replace ConsumesHybrid condition with FromHybrid 2024-11-18 19:02:43 +01:00
Laura Hausmann
2c0e0d0922
[backend/openapi] Don't regenerate OpenAPI schemas files on every request 2024-11-18 19:02:43 +01:00
Laura Hausmann
ff59b07035
[backend/federation] Add short-lived cache for non-specific federation requests 2024-11-18 19:02:42 +01:00
Laura Hausmann
1e5c033fb1
[backend/razor] Add transparent decompression hook to MapStaticAssets, replacing the old BlazorFrameworkFiles hook 2024-11-18 19:02:42 +01:00
Laura Hausmann
4186388d4c
[backend/openapi] Add scalar-ui, add OpenAPI overview page 2024-11-18 19:02:42 +01:00
Laura Hausmann
752c22980d
[backend/federation] Fix FilterHidden with except userId failing to translate
This seems to be an EF 9 specific bug, though I can't reproduce it in an isolated query. Benchmarks say the resulting queries perform identically, so I don't think this is much of an issue.
2024-11-18 19:02:41 +01:00
Laura Hausmann
2b046fc444
[parsing] Add support for has:media search query 2024-11-11 01:52:48 +01:00
Laura Hausmann
4b01ecddfa
[backend/startup] Reference help shortlinks instead of directing to the wiki 2024-11-05 23:41:20 +01:00
pancakes
71a12261a4
[backend/api] Limit follow list imports to twice every 30 mins 2024-10-31 20:48:52 +01:00
pancakes
137dc0d0e6
[backend/core] Move import/export to ImportExportService and resolve imported users 2024-10-31 20:48:07 +01:00
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