Skip to Content
DocumentationFeatureNotification Manage

Notification Management

Background

Notifications are a relatively heavy feature. Unlike low-touch background tasks such as running models or training jobs, notifications focus on interaction between users, and everyone has different preferences for how often they want to be notified.

Starting in v0.2.5, the notification feature has been decoupled from the core logic to prevent overwhelming users with too many messages.

You can now integrate notifications into your system with simple configuration on the settings page.

There are two core steps:

  1. Configure notification sources and targets.
  2. Configure notification jobs.

Notification Source Management

Currently, the following notification sources are supported:

Email

This source needs to be configured. Set host and port according to your email provider; username and password should be your email account and the SMTP authorization code.

{ "host": "smtp.example.com", "port": 587, "username": "your_email@example.com", "password": "your_password" }

Note that the password here is the SMTP authorization code, not your mailbox password. Check your email provider’s docs for how to get it.

For example, with 163 Mail, enable SMTP service and a popup will show an authorization code - that string is the SMTP auth code. You must turn on SMTP service to use this source.

Feishu

This source requires app_id and app_secret:

{ "app_id": "cli_a3f3d6a3a3f3d6a3a", "app_secret": "dkamsklmlksamkl" }

Feishu does not allow linking external files or images directly in notifications, so you need a bot that can upload files/images to Feishu. Steps:

  1. Go to the Feishu Developer Console  and create a self-built enterprise app. In the app details page, copy the app id and app secret into the configuration.
  2. Enable the image upload permission for this self-built app.

DingTalk

No parameters are required for this source for now.

Apple APNS

This source is more complex. Refer to Apple’s docs: https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns 

{ "team_id": "your team_id" }
  1. Sign in to the Apple Developer site .
  2. Open Membership details to find your Team ID.
  3. Go to Certificates, Identifiers & Profiles, create a key, and configure it. Enable the APNS option and choose the environment (Production/Sandbox).
  4. In the key details page you can see the Key ID.
  5. Click Download to get the key file; its contents are the Private Key.
  6. apns_topic is the Bundle ID of the app you are pushing to.

Apple APNS (SandBox)

Same as above, but ensure the key is for the sandbox environment.

Telegram

This source requires:

{ "bot_token": "your_bot_token" }
  1. In Telegram, search for @BotFather to find the bot creator.
  2. Click Start (skip if you’ve already started).
  3. Enter /newbot.
  4. Follow the prompts to set the bot’s display name.
  5. Follow the prompts to set the bot id; it must be unique across Telegram and end with bot.
  6. After creation, BotFather returns a message with the bot token. Copy it into the config.

Notification Target Management

Currently supported targets:

Email

Configuration:

{ "email": "your_email@example.com" }

email is the address you want to send to.

Feishu

Configuration:

{ "webhook_url": "https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxxxxxxx", "sign": "xxxxxxxxx" }
  1. Create a custom webhook bot in the group.
  2. Open the bot configuration page and enable signature.
  3. Copy the Webhook URL and signature and fill them in.

DingTalk

Same as Feishu.

Apple APNS

{ "device_token": "your_device_token" }
This approach is for developers: you need the unique device ID for your app.

You must collect the token in your app code. Example:

class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { registerForRemoteNotifications() UNUserNotificationCenter.current().delegate = self return true } func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { // Called when registration succeeds UserDefaults(suiteName: "group.com.qingyon.Revornix")!.set(deviceToken.hexString, forKey: "device_token") print("deviceToken:", deviceToken.hexString) } func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { print("Failed to register for remote notifications: \(error)") } ... }

Apple APNS (SandBox)

Same as above.

Telegram

Configuration:

{ "chat_id": "your_chat_id" }
  1. Create a Telegram group.
  2. Invite the bot you created into the group.
  3. Send a message starting with / in the group.
  4. Open https://api.telegram.org/bot[your bot_token]/getUpdates (replace [your bot_token]), and find that message.
  5. Locate the id in the response, copy it, and use it as chat_id.

Notification Task Management

Note: notification sources and targets must match, otherwise the notification will fail. See the table below.

Notification SourceNotification Target
EmailEmail
FeishuFeishu
DingTalkDingTalk
Apple APNSApple APNS
Apple APNS (SandBox)Apple APNS (SandBox)
TelegramTelegram

Both time-based and event-based triggers are supported; choose based on your needs.

Currently supported event triggers:

  • RemovedFromSection: you were removed from a section.
  • SectionCommented: a section you created/participate in was commented on.
  • SectionSubscribed: a section you created/participate in was subscribed to.
  • SectionUpdated: a section you participate in or subscribe to was updated.

Custom notification content and template-based content are supported. For real-time messages, use templates, because custom content is static at configuration time.

Available templates:

  • Daily Summary Template
  • Removed From Section Template
  • Section Commented Template
  • Section Subscribed Template
  • Section Updated Template
Last updated on