Commit graph

22283 commits

Author SHA1 Message Date
6123df0ebd
server: catch unresolvable featured notes
Instead of throwing all featured notes away, just remove that specific one.

closes #407
2024-10-18 17:39:28 +02:00
4aae4a5ffb
server: properly parse pinned post types 2024-10-18 17:28:38 +02:00
9d288c0613
translate comments 2024-10-18 17:26:13 +02:00
bc841ec965
server: enable Happy Eyeballs IPv4/v6 selection
Whoever thought it was a good idea to have this disabled by default...
2024-10-14 15:24:11 +02:00
0569bc3e15
update yarn.lock 2024-10-10 11:55:06 +02:00
880382a45f
server: remove unused dependencies 2024-10-10 11:42:30 +02:00
b63e03942e
server: remove slow option 2024-10-10 11:34:29 +02:00
67ebf83ed7
server: remove cli-highlight
This function is only used for highlighting logged PostgreSQL queries
which do not show up coloured in my log anyway so seems irrelevant.

Changelog: Changed
2024-10-10 11:23:30 +02:00
ebafed4a97
server: remove docker support
Changelog: Removed
2024-10-10 11:16:16 +02:00
d87de46217
server: remove elasticsearch
Changelog: Removed
2024-10-10 11:13:20 +02:00
35735342c1
server: remove summaly
Changelog: Removed
2024-09-07 09:48:25 +02:00
91c63388c7
server: timeout for endedPollNotification job
This gets necessary because the job now additionally tries to re-fetch
the number of votes before showing the notification since commit
6ce067af56.
2024-09-07 09:24:45 +02:00
d5cf305a3a
server: refactor fetchInstanceMetadata
The function only uses the host aspect of the instance and re-fetches
the rest from the database anyway, so it does not make sense to require
to pass the whole instance object as an argument everywhere.
2024-09-07 09:21:20 +02:00
886e21e2dd
server: update instance metadata in separate job
Previously, the deliver and inbox queue jobs would also take care of
updating the instance metadata. On a low resource server like mine,
the deliver queue is often the "critical path" and handling this
there is not a good idea.

Instead, this is handled in a separate job and with a slight delay,
to not interfere with bulk delivery jobs.
2024-08-30 01:31:02 +02:00
6ce067af56
server: re-fetch poll votes before end notif 2024-08-29 22:39:10 +02:00
650869e2f7
server: ol/ul for html->mfm
Implements a simple rendering for ordered and unordered lists.

To properly support nested lists, and lists inside of blockquotes,
this necessitated rewriting the `analyze` function to return text.
This now also means that markup inside of blockquotes will be parsed properly.
2024-08-09 00:57:09 +02:00
2ed5ecd6a1
server: code improvements in following service 2024-08-09 00:25:12 +02:00
67089193ea
server: query cache is optional
The query cache can be disabled in the configuration file and should
thus be considered optional. It should not be assumed that it is present.
2024-07-19 20:45:25 +02:00
c0364f236c
remove tests
Since I don't use them and they never really worked correctly anyway,
there is no real point in keeping them around. Also, removing them
allows to shed quite a bit of "weight" in (dev)dependencies.
2024-07-07 19:31:45 +02:00
77a8eb6f54
client: fix drive folder layout 2024-07-06 21:29:27 +02:00
be950f5313
activitypub: fix LD context
Some checks failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
ActivityPub through ActivityStreams 2.0 requires the use of the
expansion algorithm from JSON-LD 1.0 which is not able to handle nested contexts.

Fixes commit 21ab8e75ee, thanks to sn0w.
2024-05-13 00:30:00 +02:00
a9c6e51051
client: implement small/center MFM functions
Some checks failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline failed
Changelog: Added
2024-04-20 17:48:42 +02:00
c18a7a8d30
activitypub: no longer accept LD Signatures
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
LD signatures are not properly securely implemented, further they
do not seem to be necessary any more.

closes #373

Changelog: Removed
2024-04-20 17:26:25 +02:00
d34f7c7faa
apply mutes to image descriptions
Some checks failed
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
Changelog: Added
2024-04-04 00:07:45 +02:00
095802d059
server: remove unused logger.store attribute
Some checks failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline failed
2024-04-01 21:25:14 +02:00
f245b6e517
server: remove direct chalk dependency
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/test Pipeline failed
Colouring of logs is not important to me because if I view them in journalctl
there are no colours anyway.
2024-04-01 19:10:55 +02:00
c9759a3a79
add a bit of guidance for startup 2024-04-01 19:06:37 +02:00
a7a663e939
server: make some sensible sub-loggers 2024-04-01 18:35:00 +02:00
7458550f7a
server: fix some TS warnings 2024-04-01 18:26:15 +02:00
5444ca9aca
server: fix restarted job retaining the right mode
When a web or queue worker exited unexpectedly, the new restarted worker would
not have any mode set and so would try to do web and queue worker stuff at the
same time, which was not the intended behaviour.

Changelog: Fixed
2024-04-01 17:55:13 +02:00
d293fc1dc7
activitypub: fix parsing users without sharedInbox
Some checks failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
2024-04-01 12:03:13 +02:00
e2779befe6
remove duplicated cache
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
A cache for instances already exists and is exported there. Also the
type annotation here seemed wrong anyway because there did not seem to
be a way for that fetcher to actually ever return `null` as a value.
2024-03-30 23:31:47 +01:00
2218936af3
server: better performace for mass delivery
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
This should hopefully relieve some of the massive hammering on the
database when mass delivery jobs are running.

However, this also means that instance blocks are applied with a
slight delay on delivery queue. Since the settings page in the
native frontend already warns about this, I think it should be fine.
And the maximum time an instance block would be delayed would be
somewhere around 5min which IMO is also tolerable.

Changelog: Changed
2024-03-30 16:41:55 +01:00
b8b69f825a
activitypub: strict id check
TBH I'm still not quite convinced that this is really necessary but also
since treating an id mismatch like a redirect, I also don't think it
should break anything.
2024-03-30 16:40:57 +01:00
01f8c5d7da
activitypub: disallow cross-origin redirects
Changelog: Security
2024-03-30 16:12:26 +01:00
7e37a8fd88
use decrementing amount of redirects
This makes `redirects` contain the number of remaining redirects, which
makes it easier to limit the number of further redirects that should be
allowed.
2024-03-30 16:12:26 +01:00
e2311a6f4b
refactor function placement 2024-03-30 16:12:22 +01:00
ac1ef641f5
server: fix cache expiring
Some checks failed
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline failed
2024-03-30 08:39:47 +01:00
1af0687423
server: refactor fetching private key
Especially in the case where the private key is used in an "array deliver",
it makes sense to only get the private key once instead of having the overhead
of fetching the key for each HTTP request.
2024-03-27 21:22:25 +01:00
09ff7f0c7d
client: add button to delete all shown notes in clip
This makes use of the API functionality in the backend which was introduced in
commit 89761c86ab .
2024-03-27 21:12:38 +01:00
f285281b5a
fixup! server: properly expire public key cache 2024-03-26 21:06:21 +01:00
624157f03e
server: forbid activitypub requests on unexpected routes
ActivityPub requests on routes which do not support activitypub
are now replying with HTTP status code 406 "Not Acceptable".

ActivityPub clients are required by the W3C TR to set the `Accept`
header. If this accept header is detected on an unexpected route,
the whole request will be aborted with the status code above.

This is an additional measure for clients who might not be aware of
having to check the content-type header of the reply.

Ref: https://github.com/w3c/activitypub/issues/432
Changelog: Security
2024-03-26 21:05:13 +01:00
e366116ac1
add/translate comments 2024-03-22 09:41:45 +01:00
2b5a35147a
activitypub: stop accepting collections in inbox
Changelog: Removed
2024-03-20 06:27:01 +01:00
1098b3a038
activitypub: remove sending read receipts for chat
Changelog: Removed
2024-03-20 06:10:51 +01:00
6501c542b2
server: only cache public keys for 15min
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
2024-03-19 19:16:07 +01:00
ab22a1afa0
more compact notifications
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
Don't show the entire renoted note in notifications and some other places.

Changelog: Changed
2024-03-19 19:09:34 +01:00
5f09a44dbb
more tracking removal
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
2024-03-19 18:50:57 +01:00
2c55f8968c
fixup! server: return report id when reporting
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
2024-03-19 18:46:00 +01:00
fc733a4a86
server: properly expire public key cache
Changelog: Fixed
2024-03-19 18:40:34 +01:00