Send a web push for direct messages #1

Merged
vinz merged 1 commit from feature/dm-web-push into hever-next 2026-09-02 12:17:53 +02:00
Owner

Review only — not for merging without your sign-off.

See the commit message for the reasoning. Deploy order matters: the relay change is harmless on its own, the Pixelfed change is what starts sending.

Review only — not for merging without your sign-off. See the commit message for the reasoning. Deploy order matters: the relay change is harmless on its own, the Pixelfed change is what starts sending.
A direct message is the one notification a client cannot be told about.
Pixelfed already creates it — DirectMessageController writes a
Notification with action 'dm' — but nothing carries it any further:
/api/v1/notifications keeps only NotificationService::MASTODON_TYPES,
which has no 'dm', and no push pipeline dispatches for it. The web UI
sees it because it reads Pixelfed's own notifications route, which is
session-guarded and answers 401 to a bearer token.

So the notification exists and no client can reach it. This dispatches
the web push alongside it, inside the same conditions the notification
itself is created under: local recipient, not filtered into requests,
thread not muted. A filtered message still arrives silently, which is
the server's own rule rather than something this changes.

'dm' reads notify_mention, since a direct message is someone writing to
you by name — closer than notify_comment, which is about your posts
rather than about you. There is no notify_dm column and adding one would
diverge the users table from upstream permanently, which the alias table
above already exists to avoid.

No status id is passed: a direct message has no public status to
deep-link to.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESWRjpNGAwyaKGGPc5n39X
vinz merged commit e828b96b25 into hever-next 2026-09-02 12:17:53 +02:00
Sign in to join this conversation.
No reviewers
No labels
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
vinz/pixelfed-scatto!1
No description provided.