feat(cloudcommon): add NotifyWithContact

This commit is contained in:
rainzm
2020-11-30 19:58:49 +08:00
parent a8ea8b10cc
commit 66f373d073
+10
View File
@@ -149,6 +149,16 @@ func Notify(recipientId []string, isGroup bool, priority npk.TNotifyPriority, ev
notify(context.Background(), recipientId, isGroup, priority, event, data)
}
func NotifyWithContact(ctx context.Context, contacts []string, priority npk.TNotifyPriority, event string, data jsonutils.JSONObject) {
p := sNotifyParams{
contacts: contacts,
priority: priority,
event: event,
data: data,
}
rawNotify(ctx, p)
}
func notify(ctx context.Context, recipientId []string, isGroup bool, priority npk.TNotifyPriority, event string, data jsonutils.JSONObject) {
switch priority {
case npk.NotifyPriorityCritical: