Merge remote-tracking branch 'origin/main' into fred777-add_bot_globals

This commit is contained in:
fred777
2026-06-12 16:34:00 +02:00
14 changed files with 631 additions and 146 deletions
+1
View File
@@ -132,6 +132,7 @@ HTTP webhook delivery. Config blob:
Push notifications via Apprise library. Config blob:
- `urls` — newline-separated Apprise notification service URLs
- `preserve_identity` — suppress Discord webhook name/avatar override
- `include_outgoing` — when true, RemoteTerm-originated manual and bot-sent messages are forwarded to Apprise; missing/false preserves the legacy incoming-only behavior
- `include_path` — include routing path in notification body
- Channel notifications normalize stored message text by stripping a leading `"{sender_name}: "` prefix when it matches the payload sender so alerts do not duplicate the name.
+4 -3
View File
@@ -188,14 +188,15 @@ def _send_sync(urls_raw: str, body: str, *, preserve_identity: bool, markdown: b
class AppriseModule(FanoutModule):
"""Sends push notifications via Apprise for incoming messages."""
"""Sends push notifications via Apprise for matched messages."""
def __init__(self, config_id: str, config: dict, *, name: str = "") -> None:
super().__init__(config_id, config, name=name)
async def on_message(self, data: dict) -> None:
# Skip outgoing messages — only notify on incoming
if data.get("outgoing"):
# Skip outgoing messages by default. Operators can opt in when they
# want RemoteTerm-originated manual/bot sends mirrored to Apprise.
if data.get("outgoing") and not self.config.get("include_outgoing", False):
return
urls = self.config.get("urls", "")