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:
- Configure notification sources and targets.
- Configure notification jobs.
Notification Source Management

Currently, the following notification sources are supported:
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:
- 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.

- 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"
}- Sign in to the Apple Developer site .
- Open
Membership detailsto find yourTeam ID. - Go to
Certificates, Identifiers & Profiles, create a key, and configure it. Enable the APNS option and choose the environment (Production/Sandbox).
- In the key details page you can see the
Key ID.
- Click Download to get the key file; its contents are the
Private Key. apns_topicis theBundle IDof 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"
}- In Telegram, search for
@BotFatherto find the bot creator.
- Click Start (skip if you’ve already started).
- Enter
/newbot.
- Follow the prompts to set the bot’s display name.

- Follow the prompts to set the bot id; it must be unique across Telegram and end with
bot.
- After creation, BotFather returns a message with the bot token. Copy it into the config.

Notification Target Management

Currently supported targets:
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"
}- Create a custom webhook bot in the group.

- Open the bot configuration page and enable signature.

- Copy the
Webhook URLandsignatureand fill them in.
DingTalk
Same as Feishu.
Apple APNS
{
"device_token": "your_device_token"
}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"
}- Create a Telegram group.
- Invite the bot you created into the group.
- Send a message starting with
/in the group. - Open
https://api.telegram.org/bot[your bot_token]/getUpdates(replace[your bot_token]), and find that message. - Locate the
idin the response, copy it, and use it aschat_id.
Notification Task Management
Note: notification sources and targets must match, otherwise the notification will fail. See the table below.
| Notification Source | Notification Target |
|---|---|
| Feishu | Feishu |
| DingTalk | DingTalk |
| Apple APNS | Apple APNS |
| Apple APNS (SandBox) | Apple APNS (SandBox) |
| Telegram | Telegram |

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