The bell: every notification type, linked into the app, follow requests answerable - #2173
Open
karlitschek wants to merge 2 commits into
Open
The bell: every notification type, linked into the app, follow requests answerable#2173karlitschek wants to merge 2 commits into
karlitschek wants to merge 2 commits into
Conversation
karlitschek
force-pushed
the
feat/bell-notifications
branch
from
September 14, 2026 00:11
4ead75e to
4244dc6
Compare
…ts answerable Nextcloud's bell already heard about mentions, favourites, boosts, follows, follow requests and edits. It did not hear about a poll the reader voted in closing or a post from an account whose bell they rang — both stored for the client API, neither raised — and every entry it did raise linked out to the remote object rather than into this app's own page for it, which is the complaint in #1628. NotificationService::emit() now raises `poll` and `status` too (a poll's author is told about their own poll closing, as on Mastodon), and builds the link into the app — `/@handle/nid` for a post, `/@handle` for an account — falling back to the remote address only when it cannot name a page. A follow request carries the follower's id, and Notifier puts Accept and Decline on the bell entry, POSTing to the same routes a Mastodon client uses; answering through either route dismisses the stored row and withdraws the bell entry (onFollowRequestAnswered()), so it does not come back on the next reload. Closes #1631 (followers reach the bell), #1021 (mentions do) and #1628 (the entries link into the app and can be acted on). Signed-off-by: Frank Karlitschek <frank@nextcloud.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Frank Karlitschek <frank@nextcloud.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
karlitschek
force-pushed
the
feat/bell-notifications
branch
from
September 14, 2026 00:12
4244dc6 to
6f1a26e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 8 of the fresh look. The bell already heard about mentions, favourites, boosts, follows, follow requests and edits (
NotificationService::emit()), so #1631 and #1021 were closable as they stood — after checking the two types that were stored for the client API but never raised, and the one thing #1628 actually complains about.What changes
pollandstatusreach the bell. A poll the reader voted in closing (PollService::announceClosedPolls()) and a post from an account whose bell they rang (notifyon follow) were stored as notification rows and listed in the app, but Nextcloud was never told. Both are inSUBJECTSnow andNotifierwords them ("The poll by %s has ended", "%s posted"). A poll's author is told about their own poll closing — the one case where actor = recipient is news, and who Mastodon tells too./apps/social/@handle/nidfor a post,/apps/social/@handlefor an account, built from the post's nid and the cached actor's handle (with the local username as fallback). Only when no page can be named does the remote address stay — the old behaviour, now the exception.Notifieradds Accept (primary) and Decline actions that POST to/api/v1/follow_requests/{id}/authorizeand/reject— the routes a Mastodon client uses. Answering through either route (bell, app, or client) dismisses the stored row and withdraws the bell entry (onFollowRequestAnswered(), wired intoApiController::followRequestAction()), so it does not come back on reload. An entry raised before the follower was cached (no id) still says who asked and links to them, without buttons.Item 9 (the
sourceblock leak) turned out to be already fixed on master —Person::exportSourceAsLocal()is separate fromexportAsLocal()since 9f5e426 andPersonTestpins it — so there is nothing to ship for it.Verification
nidon a follow request, poll telling its own author, the dismissal on answer (NotificationServiceTest); Accept/Decline actions with their routes and methods, no buttons without an id, the two new wordings (NotifierTest);NotifierSubjectsTestcovers every subject and now usessevered_relationshipsas its "nothing raises this" example.docs/Architecture.mdupdated. Version 0.19.37.Closes #1631, closes #1021, closes #1628.
🤖 Generated with Claude Code