Merge pull request #8827 from rainzm/fix/notifyRobot

Fixs of Notify
This commit is contained in:
Zexi Li
2020-11-17 17:51:57 +08:00
committed by GitHub
3 changed files with 22 additions and 1 deletions
+7 -1
View File
@@ -333,7 +333,13 @@ func notifyRobot(ctx context.Context, robot string, recipientId []string, isGrou
if err != nil {
return err
}
jarray, _ := result.Get("types")
if result == nil {
return nil
}
jarray, err := result.Get("types")
if err != nil {
return err
}
cTypes := jarray.(*jsonutils.JSONArray).GetStringArray()
for _, ct := range cTypes {
RawNotifyWithCtx(ctx, recipientId, isGroup, npk.TNotifyChannel(ct), priority, event, data)