api: prefer duration param for mute expiration #1004

Merged
Oneric merged 1 commit from Oneric/akkoma:mute-expiry-duration into develop 2025-11-08 13:39:56 +00:00
Owner

Mastodon 3.3 added support for temporary mutes but uses "duration" instead of our older "expires_in". Even Husky only sets "duration" nowadays.

Cherry-picked-from: pleroma/-@5d3d6a58f7 (with edits to resolve conflicts)

Side note: imho it’d be better to store the expiry in the database, checking it when relevant and from time to time clean up already expired records instead of enqueuing oban jobs for this (which might be months or years into the future and just clutter the job table). Pleroma actually already stores the expiry in the database (which is where most conflicts came from), but doesn't use it for anything except display continuing to use jobs for unmuting

Mastodon 3.3 added support for temporary mutes but uses "duration" instead of our older "expires_in". Even Husky only sets "duration" nowadays. Cherry-picked-from: https://git.pleroma.social/pleroma/pleroma/-/commit/5d3d6a58f72888b8714605032b417091a8891bb4 (with edits to resolve conflicts) Side note: imho it’d be better to store the expiry in the database, checking it when relevant and from time to time clean up already expired records instead of enqueuing oban jobs for this (which might be months or years into the future and just clutter the job table). Pleroma actually already stores the expiry in the database (which is where most conflicts came from), but doesn't use it for anything except display continuing to use jobs for unmuting
api: prefer duration param for mute expiration
Some checks failed
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/test/2 Pipeline was successful
8532f789ac
Mastodon 3.3 added support for temproary mutes but uses "duration"
instead of our older "expires_in". Even Husky only sets "duration"
nowadays.

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>

Cherry-picked-from: 5d3d6a58f7
Oneric merged commit 467e75e3b1 into develop 2025-11-08 13:39:56 +00:00
Oneric deleted branch mute-expiry-duration 2025-11-08 13:39:57 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AkkomaGang/akkoma!1004
No description provided.