Skip to content

Signals & Notifications

The Signals & Notifications system delivers proactive messages to users through their connected notification channels (Telegram and Threema). It is used by background jobs — daily briefings, important email alerts, meeting prep reminders, commitment reminders, and awaiting-response notifications — to reach users outside the Swisper chat interface. The system respects a two-level preference model: a global signals toggle and per-channel notification enable flags.

Key Components

Component Purpose
SignalsService Central service: resolves available channels for a user, sends notifications in parallel across channels
ChannelManager Determines which notification channels a user has active and enabled
TelegramChannel Sends messages via the Telegram Bot API with Markdown v1 formatting
ThreemaChannel Sends messages via the Threema Gateway API with plain-text formatting and retry logic
NotificationMessage Pydantic model: title (optional), content, user_id, metadata (optional)
Notification Preferences API Endpoints for reading/updating global signals toggle and per-channel notification enable

Documentation Sections

  • Overview — What this module does, channel types, preference model, and delivery flow
  • Architecture — System design, channel implementations, message formatting, and design decisions