Repository navigation
feat: Apprise can send each request's notifications to the user who made it - #547
Merged
Merged
Conversation
…ade it
{user} in the Apprise Tag field (Config Key mode) expands to a tag-safe
form of the requester's username, so a per-user tag in the Apprise config
routes each request's notifications to that user. A Tag without {user} is
sent as before. When a notification has no requester, the {user} part is
dropped, and if nothing is left the notification is not sent through that
backend.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tional Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… are logged as skipped
The Tag is now split with apprise-api's own delimiters (OR on , or |, AND
on spaces, & or +), so a requester named "all" can no longer widen an
OR group written with |, and a group joined with & is dropped whole when
there is no requester. A Tag without {user} is still sent byte for byte.
A name whose letters all drop out of the tag (for example Cyrillic or
Chinese names) counts as no requester instead of becoming its digits.
A backend that sends nothing is logged as skipped with the reason (no
requester, or a name that would select every Apprise target) rather than
as succeeded. The Tag help text states the name rule with the example
Jane Doe -> jane-doe, and the docs show a two-backend setup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kikootwo
marked this pull request as ready for review
November 2, 2026 19:51
This was referenced Nov 2, 2026
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.
Summary
The Apprise backend's Tag field now understands
{user}. With a Config Key, RMAB replaces{user}with a tag-safe form of the requester's username, so you list each user'smailto://address under their tag in your Apprise config and each request's notifications go to the person who asked for it. A Tag without{user}is sent exactly as before.Changes
src/lib/services/notification/providers/apprise-tag.ts(new):toAppriseUserTag()turns a username into a tag Apprise accepts;resolveAppriseTag()expands{user}in the configured Tag.[a-z0-9][a-z0-9_-]*): lowercase, accents removed, every run of characters other than a-z, 0-9 and_becomes one-, and-/_are trimmed from both ends. It never produces an Apprise separator or operator (,|;&+[]space:).Jane Doebecomesjane-doe;José.O'Brien@example.combecomesjose-o-brien-example-com.,or|(/\s*[|,]\s*/), AND terms on spaces,&or+(/[\s&+]+/). When the Tag holds{user}, it is rebuilt asgroup, groupwithterm terminside, which Apprise reads the same way:admin|user-{user}is sent asadmin, user-jane,admin&user-{user}asadmin user-jane.Unknown Userfallback used when a request's user can't be loaded, or a name none of whose letters survive the rule (李明gives nothing, andДочь 1counts as no requester rather than becoming1). A name made only of digits keeps them.{user}that would turn into Apprise'salltag (All!and fullwidthallincluded): every group holding{user}is dropped whole, whatever the separator, so an AND group never gets wider andadmin|{user}for a user namedallgoes only toadmin. If nothing is left, the notification is not sent through that backend. An untagged send would go to the config's untagged URLs, not to the requester.apprise.provider.ts: Config Key mode sends the resolved tag; when nothing is left it returns a skip with the reason. Stateless mode (urls) is unchanged and still ignores the Tag.notification.service.tsandINotificationProvider.ts: a provider'ssend()may now resolve to{ skipped: true, reason }. The service counts it as skipped, not succeeded (Notification sent: 0 succeeded, 1 skipped, 0 failed), and logsSkipped backend <name>: <reason>, where the reason says whether there was no requester or the name would select every Apprise target. The log lines hold no URLs, tokens, keys or usernames. Other providers are unchanged.e.g. admin, user-{user}and help textConfig Key only. {user} = the requester's name, lowercase with - for spaces and punctuation (Jane Doe → jane-doe). List their URLs under that tag.(3 lines at 375 px). Help text was picked over save-time validation so existing configs keep saving as they are.documentation/backend/services/notifications.md(the rule, the separators, the no-requester behaviour, name collisions, a two-backend example),documentation/settings-pages.md,documentation/testing/e2e-harness.md.preferred_username/email/sub, or the local username). Forissue_reportedit is the person who reported the issue. Only fallbacks where the request or user row is missing reach the no-requester path. The Settings Test button sends asTest User, so{user}there becomestest-user.How to set it up
Apprise config (TEXT form,
tag=url), stored under your Config Key:Events are chosen per backend, so add two Apprise backends in RMAB with the same Config Key:
admin, every event: the owner gets everything.user-{user}, Request Approved and Request Available only: Jane Doe and Sam hear about their own requests, without Pending Approval, Request Error or Issue Reported.Use a prefix such as
user-{user}. A bare{user}collides with any other tag in your Apprise config that equals a username: a user namedadminwould receive every admin notification.Tests
tests/services/apprise-user-tag.test.ts(new, 30 tests, all throughAppriseProvider.send()orNotificationService.sendNotification()withfetchmocked): literal tags unchanged, including a Tag with|and&and no{user}sent byte for byte;{user}with spaces, case, punctuation, separator characters, accents, digits and underscores; OR and AND forms with,,|, spaces,&and+;admin|{user}for usersall,All!andallgoes only toadmin;admin|user-{user}with no requester still goes toadmin;admin&user-{user}andadmin + user-{user}with no requester are dropped; no requester (empty,Unknown User,李明,Дочь 1); digits-only and mixed-script names;Jane Doeandjane.doeshare a tag; the skip reasons; the service logs a skipped backend as skipped with its reason and without the username; stateless mode ignores the Tag; the form's help text and placeholder.allvariants, help text).regressions/174-apprise-user-tag.spec.ts: opens the Apprise form in Settings > Notifications, checks the help text (at most 3 lines) and placeholder, snapshots at 1280 px light and 375 px dark.Checks
npx vitest runon the 14 files above: 247 passednpx tsc --noEmit: cleannpx eslinton the changed files: no new findings (theno-explicit-anyerrors reported inapprise.provider.ts,notification.service.tsandINotificationProvider.tsare on main too)Risk and rollback
Low. Only Apprise backends in Config Key mode whose Tag contains
{user}behave differently; every other Tag is sent byte for byte as before. The skip result is new in the provider interface; other providers never return it.Users whose names fold to the same tag share notifications:
Jane Doe,jane.doeandJANE-DOEall becomejane-doe, and李明 Leeand王芳 Leeboth becomelee. Usernames are not unique across sign-in methods, so the admin should check the tags of similar names before listing URLs under them.Rollback is a revert. After a rollback, a Tag holding
{user}is sent literally and its{user}part matches no URL in Apprise, so per-user notifications stop; take{user}out of the Tag when downgrading.Screenshots
The Tag help text in the Apprise backend dialog (evidence).
Closes #174
🤖 Generated with Claude Code