更新若干功能

This commit is contained in:
李琦
2026-08-14 17:54:06 +08:00
parent 89bc265f68
commit ce00c9d193
18 changed files with 779 additions and 158 deletions

View File

@@ -152,11 +152,22 @@ func (a *App) pushMessage(kind, title, body, sourceType string, sourceID int64,
return
}
a.emit("message:new", m)
a.RefreshTrayStatus()
if notify && a.notifier != nil {
path := "/messages"
switch sourceType {
case "todo":
path = "/todos"
case "ticket":
path = "/tickets"
case "team":
path = "/team/tasks"
}
_ = a.notifier.SendNotification(notifications.NotificationOptions{
ID: fmt.Sprintf("cc-%s-%d", kind, m.ID),
Title: title,
Body: body,
Data: map[string]interface{}{"path": path, "kind": kind, "sourceType": sourceType, "sourceId": sourceID},
})
}
}