Repository navigation
feat: push notifications for Bots (notify_user) - #842
Draft
dingchenhui0618-arch wants to merge 1 commit into
Draft
dingchenhui0618-arch wants to merge 1 commit into
dingchenhui0618-arch wants to merge 1 commit into
Conversation
A scheduled task or a long job ends while the page is closed, so the result waits unseen in the chat. notify_user sends the outcome to the user's phone through Bark, ntfy, ServerChan or a webhook. Channels come from <DSH_HOME>/bot/notify.json, else from BARK_URL, NTFY_TOPIC, SERVERCHAN_KEY and PUSH_WEBHOOK: the same four names the dsh-chat bridge uses, so one set of credentials serves both.
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.
What this changes
Adds an outbound push channel: the
otify_user tool lets a Bot send one short message to the user's phone (Bark, ntfy, ServerChan or a webhook).
A scheduled task, or a long job, can end while the page is closed. Today the result only waits in the chat, and the user learns about it when they next open the app. With this tool a Bot can say it is done.
Channels are read from <DSH_HOME>/bot/notify.json ({channels: [{kind: ntfy, topic: ...}]}), else from BARK_URL, NTFY_TOPIC (+ NTFY_SERVER), SERVERCHAN_KEY, PUSH_WEBHOOK. Those are the four names the dsh-chat bridge already uses, so one set of credentials serves both.
Notes
Changelog
Bots can push a short message to the user's phone with
otify_user, so a scheduled task that ends while the page is closed still reaches them.
Related
Part of the gap in #314 (a decision request sits unseen in the chat stream): this gives Bots a way out to the user. It does not change �sk_user itself.