更新若干功能
This commit is contained in:
11
workbench.go
11
workbench.go
@@ -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},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user