Don’t litter tokens and Iceshrimp.NET support #452

Merged
Oneric merged 6 commits from Oneric/akkoma-fe:frugal-tokens-and-iceshrimp.net into develop 2025-10-13 12:22:34 +00:00
Owner

Fixes the issues described in #429.

As mentioned there, the Iceshrimp.NET fork already had a commit partly addressing it, but as suspected it broke registrations. I fixed it up to work with registrations and also added the missing app token cleanup.

While at it I also imported most other changes requried for supporting Iceshrimp.NET backends since they were small and either fix a bug kind-of affecting us too (a legacy fallback prevented it from manifesting) in case of the credential fix or seem harmless in case of the emoji change.
Afaict this leaves only some change to the mention button to fully match the fork, but I don’t encounter the described issue so this might either already been fixed by us in the past year, or it could be an issue of their Pleroma/Mastodon-API implementation and should be fixed there: iceshrimp/akkoma-fe@0b53b63797

Full list of the fork’s commits here: https://iceshrimp.dev/iceshrimp/akkoma-fe/commits/branch/iceshrimp
*(Note backend source URLs can be overwritten with a server-side config response; there’s no need to change it in the frontends source)

Fixes the issues described in #429. As mentioned there, the Iceshrimp.NET fork already had a commit partly addressing it, but as suspected it broke registrations. I fixed it up to work with registrations and also added the missing app token cleanup. While at it I also imported most other changes requried for supporting Iceshrimp.NET backends since they were small and either fix a bug kind-of affecting us too (a legacy fallback prevented it from manifesting) in case of the credential fix or seem harmless in case of the emoji change. Afaict this leaves only some change to the mention button to fully match the fork, but I don’t encounter the described issue so this might either already been fixed by us in the past year, or it could be an issue of their Pleroma/Mastodon-API implementation and should be fixed there: https://iceshrimp.dev/iceshrimp/akkoma-fe/commit/0b53b6379754268a05c7b436d9def4c926ab5e42 Full list of the fork’s commits here: https://iceshrimp.dev/iceshrimp/akkoma-fe/commits/branch/iceshrimp *(Note backend source URLs can be overwritten with a server-side config response; there’s no need to change it in the frontends source)
The frontend assumes these URLs will be relative to the target instance,
which may not be the case for non-*oma backends like Iceshrimp.NET
due to the backend storing emoji in an external object storage depending
on configuration.

Cherry-picked-from: c147c2aeb3
This only worked in *oma due to legacy session-cookie auth kicking in
(which we should really get around to fully purge).

Cherry-picked-from: e8896fad15
Original commit amended with a fix for registrations;
they need to (now) create an app and fetch an app-only token
before doing anything else, as this endpoint requires such a token.

Co-authored-by: Oneric <oneric@onierc.stub>

Cherry-picked-from: 0e25b94186
We don’t need them after initial account registration
and they just clutter the database otherwise

Together with the preceding commit this should get the
flood of garbage tokens into our database under control.
(We still want to fix the backends cleanup of old,
 already existing tokens though)

Fixes: #429
Lock package manager version
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
a2610406cb
At least modern versions of corepack'ed yarn
(as build instructions tell use to use)
reaaally want to add this to the lockfile,
so let it do so to not need to constantly
be wary of uncommited changes here.
user_card: don't set replied-to-status id to a boolean
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
b9a268a4a0
Instead, just also prefill the text wuth the user handle
for pure mentions.
This lead to us sending a boolean status id to the backend
which presumably only didn't cause problems in *oma backends
because API spec validation dropped the value with a mismatched type.
On an Iceshrimp.NET backend this caused errors to pop up.

There are more conditions gated by replyTo in the post form but
no longer triggering them doesn't seem to have any noticeable effect.
The one noticeable change being mentions now share a draft save slot
with regular message composing (before all mention messages shared the
same reply:true slot), but this seems sensible enough.
Oneric changed title from Don’t litter tokens and (almost?) Iceshrimp.NET support to Don’t litter tokens and Iceshrimp.NET support 2025-10-12 14:35:58 +00:00
Author
Owner

The mention patch was about akkoma-fe setting the replied to status id to a boolean and this then being sent to the backend. On akkoma I believe the value just got filtered out by ApiSpec validation thus not causing issues, but on iceshrimp.net it lead to errors.

Setting a boolean id is quite nonsensical. Added an alternative fix which avoids mistyped values all together. This should complete all changes needed to run with a iceshrimp.NET backend

The mention patch was about akkoma-fe setting the replied to status id to a boolean and this then being sent to the backend. On akkoma I believe the value just got filtered out by ApiSpec validation thus not causing issues, but on iceshrimp.net it lead to errors. Setting a boolean id is quite nonsensical. Added an alternative fix which avoids mistyped values all together. This should complete all changes needed to run with a iceshrimp.NET backend
Oneric force-pushed frugal-tokens-and-iceshrimp.net from b9a268a4a0
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
to 877dde80c9
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
2025-10-12 15:01:48 +00:00
Compare
Author
Owner

Now that the release is out and since this seems sensible enough +works-for-me™ i guess this should be fine to merge as is (without risking putting something without wider testing into the “stable” release branch). Will be an extra treat for develop users

Now that the release is out and since this seems sensible enough +works-for-me™ i guess this should be fine to merge as is (without risking putting something without wider testing into the “stable” release branch). Will be an extra treat for `develop` users
Oneric merged commit 57a809946c into develop 2025-10-13 12:22:34 +00:00
Oneric deleted branch frugal-tokens-and-iceshrimp.net 2025-10-13 12:22:34 +00:00
Sign in to join this conversation.
No description provided.