Commit graph

16169 commits

Author SHA1 Message Date
Oneric
7a49dd6c59 installation/nginx: allow incoming http2 connections 2025-08-20 00:00:00 +00:00
Oneric
c94d01a0ab Refactor AdapterHelper and default Finch opts
The old code was unnecessarily complicated, full of unused and/or
duplicated functions making it hard to understand what will actually
happen and for whom at runtime.
Since we only support a single HTTP backend this can be greatly simplified.

Now everything gets default options from a single place and only
functions to modify parts actually difffering across calls are exposed.
2025-08-20 00:00:00 +00:00
Oneric
cd7bc96bc6 web/endpoint: drop unused function load_from_system_env
It’s not called anywhere in out code and
also doesn’t appear to be part of Phoenix.Endpoint’s interface
2025-08-20 00:00:00 +00:00
Oneric
c3c5277e05 Allow both HTTP1 and HTTP2 for outgoing connections
No HTTP3/QUIC support yet.
Note, allowing both here means we don't actually profit from HTTP2 multiplexing
due to Finch(? or maybe a dependency of Finch?) limitations. But it means we can
now interact with HTTP2-only instances (if such exist) and still may get minor
gains from header compression etc

Adventurous admins can change the config to allow only HTTP2,
thus profiting from multiplexing (but breaking federation with
HTTP1-only instances which are in fact observed to exist).
2025-08-20 00:00:00 +00:00
Oneric
9bcee957c5 federation/out: don't retry deliveries to known-deleted actors 2025-08-19 00:00:00 +00:00
Oneric
da4d642945 telemetry: log which states get mapped to 'unknown' 2025-08-19 00:00:00 +00:00
nikclayton
2b388523c7 docs/client: add Pachli
It explicitly intends to keep v1 filters around.
2025-08-18 00:00:00 +00:00
nikclayton
54b561ee2c docs/clients: Tusky is dropping v1-filter support
The next Tusky release is going to remove support for the v1 filters API,
see: https://codeberg.org/tusky/Tusky/pulls/5215.

Since Akkoma doesn't support the v2 API this
could cause significant issues for Akkoma users.
2025-08-18 00:00:00 +00:00
Oneric
1924ec08c0 Provide reference Grafana dashboard
And improve monitoring documentation in particular
more detailed instructions for setting up Prometheus
metric scraping and the reference Grafana dashboard.
2025-08-17 00:00:00 +00:00
Oneric
06dac6e7b5 docs: drop exact version pins on python dependencies
These old package versions cause issues in modern Python environments.
2025-08-17 00:00:00 +00:00
Weblate
c2f8d36206 Translated using Weblate (Turkish)
Currently translated at 0.1% (2 of 1004 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (0 of 0 strings)

Added translation using Weblate (Turkish)

Co-authored-by: Anonymous <noreply@weblate.org>
Co-authored-by: Hasan Yıldız <hasanyildiz0@yaani.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/akkoma-backend-config-descriptions/tr/
Translation: Pleroma fe/Akkoma Backend (Config Descriptions)
2025-08-04 00:25:54 +00:00
Floatingghost
eca7ed572b Do not federate undo->block activities
the :do_not_federate checks were omitted from the undo pipeline,
which could lead to them federating.

this commit enforces :outgoing_blocks on undos as well - and
any existing value of :do_not_federate is preserved, if one exists

Fixes #957
2025-08-02 09:47:32 +01:00
Oneric
5beb286bff Merge pull request 'config/description: hint at Swoosh defaulting to SSL' (#955) from Oneric/akkoma:confdesc-swoosh-ssl into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/955
2025-07-29 19:18:39 +00:00
Oneric
af84dcb28f config/description: hint at Swoosh defaulting to SSL
Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/953
2025-07-29 19:02:17 +00:00
Oneric
23a4d5a15f Merge pull request 'federation/in: fix inlined featured collections' (#949) from Oneric/akkoma:fix-inline-featured into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/949
2025-07-24 18:55:59 +00:00
Oneric
deb8689eba federation/in: fix inlined featured collections
Resolves interop issue with a (reverted but possibly returning) bridgy change
as was reported in the comments of
https://akkoma.dev/AkkomaGang/akkoma/issues/831.
This won't change anything for the problem originally reported there.

Notably we now always fetch the full collection (up to the configured
item count limit) instead of only using the first page if its link was
inlined.
2025-07-21 17:45:20 +00:00
Oneric
e2987402b3 Merge pull request 'Optimise CI runs' (#938) from Oneric/akkoma:ci-tweaks into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/938
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-07-11 22:23:29 +00:00
Oneric
ea5a2a9f21 mix: replace deprecated warnings_as_errors option 2025-06-22 17:36:56 +02:00
Oneric
5a5d4cb86f ci: drop variables from files not using them at all 2025-06-22 17:36:55 +02:00
Oneric
c7b46e3799 ci: make pipelines conditional
If only steps are conditional the whole CI workflow
will be held up waiting until a slot is available to start them
just to then not do anything at all.

This allows us to drop "when" condition from individual steps
whenever it is now redundant with the top-level condition.
2025-06-22 17:36:55 +02:00
Oneric
25da959772 ci: merge lint and test pipeline
The lint pipeline spent ~7 minutes downloading and compiling
and only a few seconds actually checking the style.
The former is fully redundandt with what’s done during test anyway.
2025-06-22 17:36:55 +02:00
Oneric
d63292561b ci/test: remove superfluous matrix combinations
When include is used only the specified combinations
are executed and the full list above is ignored
2025-06-22 17:36:55 +02:00
Oneric
16d7d612ff Merge pull request 'misc: missing changelog entries + drop accepts_chat_messages + dedupe htmlMfm test payloads' (#943) from Oneric/akkoma:misc_chat+changelog+dedupehtmlMfmTest into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/943
2025-06-22 15:10:04 +00:00
Oneric
1c2407c129 test/federator: deduplicate html_mfm test payloads 2025-06-22 17:09:07 +02:00
Oneric
81285d06be db: drop accepts_chat_messages from users
Another leftover of chats wasting space.
All uses were purged in 0f132b802d.
2025-06-22 17:09:02 +02:00
Oneric
94207c425d changelog: add missing entries
Everything relevant since 6e0b6f2915
which wasn’t listed yet
2025-06-22 16:32:36 +02:00
Oneric
f2c2ec5e27 Merge pull request 'Add htmlMfm key when relevant' (#878) from ilja/akkoma:add_fep-c16b_discovery_mechanism_to_not_always_reparse_mfm into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/878
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-06-22 14:31:32 +00:00
ilja space
d200c7e11c Add extra tests + fix storing htmlMfm in database when federated
- This adds extra tests to be sure that scrubbing still happens.
- When doing this I notices that the htmlMfm key wasn't stored in the database when comming through the federator. This has been now been fixed too.
- We also test that values true, false or no attribute all work for incomming messages.
2025-06-21 11:32:22 +02:00
Oneric
7f6ebcb12e Merge pull request 'federation/in: improve reply on requests from blocked domains' (#940) from Oneric/akkoma:httpsig-mrf-reply into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/940
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-06-10 19:17:19 +00:00
Oneric
0a9e7d4712 federation/in: improve reply on requests from blocked domains
Previously all such requests led to '401 Unauthorized'
whih might have triggered retries.
Now, to not leak any MRF info, we just indicate an
accept for POST requests without actually processing the object
and indiscriminately return "not found" for GET requests.

Notably this change also now causes all signed fetch requests from
blocked domains to be rejected even if authorized_fetch isn’t enabled.

Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/929
2025-06-10 20:43:33 +02:00
Oneric
42022d5f48 Merge pull request 'Allow fine-grained announce visibilities' (#941) from Oneric/akkoma:announce-visibility into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/941
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-06-10 18:33:59 +00:00
Oneric
954f6f7de0 Allow fine-grained announce visibilities
Mastodon supports all standard visibilities except direct here,
but until now we artificially limited this to either fully public
or followers-only.
2025-06-09 20:58:42 +02:00
Oneric
f452430acc Remove non-local recipients from local post addressing
They won’t receive local-only posts anyway
so it makes no sense to list them as recipients.
2025-06-09 20:32:34 +02:00
Oneric
2cdc4acce9 common_api/utils: break up get_to_and_cc
To make it usable in scenarios without a draft.
The next commit adds a user for the new function.

This does technically change behaviour a bit, since
"private" relies to "direct" messages no longer implicitly
address the parent post’s actor, but this seems like a contrived
scenario and was likely never intended to actually occur anyway
as cocorroborated by the absence of tests for it.
2025-06-09 20:31:35 +02:00
Oneric
242e798054 Merge pull request 'Fix Finch timeout config options' (#939) from Oneric/akkoma:finch-timeouts into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/939
2025-06-08 11:11:12 +00:00
Oneric
80a65be38f config: raise Finch pool timeout
A pool timeout shorter than the receive timeout
makes race conditions leading to active connections
being killed more likely and laso just doesn’t make
much sense in general.

See: https://github.com/sneako/finch/pull/292
2025-06-08 12:37:13 +02:00
Oneric
07abbd8de5 config: drop unused duplicate finch pool timeout config
This was added in a924e117fd
with its name mirroring Finch’s own config option, but with
pool_timeout such a setting already existed since
2fe1484ed3 and the new one
was never actually used.
2025-06-08 12:21:33 +02:00
Oneric
3bc583d14f Merge pull request 'Don’t crash due to broken JSON on emoji reload' (#933) from Oneric/akkoma:emoji-reload-no-crash into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/933
2025-06-07 20:01:48 +00:00
Oneric
401883b230 Merge pull request 'provide full replies collection in ActivityPub objects' (#904) from Oneric/akkoma:ap_replies_collection into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/904
2025-06-07 19:33:40 +00:00
Oneric
489b17a60d test/emoji: clean up after failure
Since the cleanup is only registered after everything succeeded,
no cleanup was done on failure permanently breaking the test
2025-06-07 21:22:37 +02:00
Oneric
98762992fb emoji: avoid crashing whole server on broken JSON
It may still crash due to a race condition between checking for file
existence and opening/streaming, but File.stream! has no safe version
we can use to avoid this completely.
Just not deleting such files during a reload is easy enough.
2025-06-07 21:22:37 +02:00
Oneric
b41a13df56 federation/out: add full replies collection to objects
Until now only a limited number of self-replies were inlined as an
anonymous, unordered ActivityPub collection. Notably the advertised
replies might be private posts.

However, providing all (non-private) replies allows for better thread
consistency across instances if the remote server cooperates.
The collection existing as a stndalone object has two advantages
for this. For one, if it was still anonymous, _all_ replies would need
to be inlined, which might be too bloated in pathological cases.
Secondly, it allows remote servers to update the thread by traversing
the reply collection independent of the original post. (If the remote
part knows about chronological ordering, it can in theory
even efficiently resume from where it previously stopped)
2025-06-07 21:02:31 +02:00
Oneric
c55654876f federation/in: handle ordered 'replies' collections
An OrderedCollection uses orderedItems instead of the items key.
So far inlined orderedCollections thus failed to be processed.
Ordered replies collections are used e.g. by IceShrimp.NET and Sharkey,
while Mastodon uses a partially inlined plain Collection.
2025-06-07 21:02:31 +02:00
Oneric
77749bf107 pagination: prevent path params from turning query params
Not all endpoints use OpenAPISpex’ string-to-atom mapping
and they’ll end up with path params being promoted to
query params in pagination next/prev links.
Fix this by never including path params in the first place
2025-06-07 21:02:31 +02:00
Oneric
d1cd3de282 ap/views: factor out common keyset collection bits
The enxt commit will add another user of the new function.
2025-06-07 21:02:31 +02:00
Oneric
80e8c29e64 cosmetic/web/ap/view: split out collection helper functions
And use more precise name.
2025-06-07 21:02:31 +02:00
Oneric
138b1c5165 pagination: fix custom id_type when used with string keys
Ecto.cast is will convert valid string keys to atoms, but can
only deal with inputs which use either string keys everywhere
or atom keys everywhere.
Since :id_type is used before the case it must be an atom,
thus it was impossible to use it with string paramteres before.
2025-06-07 21:02:31 +02:00
Oneric
1ae7d03f5d pagination: support ascending/chronolgical ordering
Up until now queries were always forced into descending ID order
(reverse chronological order with our ID schemes).
Now it’s possible to request the reverse by passing `oder_asc: true`.
2025-06-07 21:02:31 +02:00
Oneric
5c79ff8503 queries: drop unused query function 2025-06-07 21:02:31 +02:00
Oneric
89678f92d9 ap/collection: don't advertise next page if no more entries
And off-by-one error caused the last page
to always advertise one more page eventhough
the absence of further items is known
2025-06-07 21:02:31 +02:00