fix(notify): Replace String() with GetString()

The String() of jsonutils.JSONObject will add a pair of
double quotes around the content. The GetString() will
get a clean content.
This commit is contained in:
rainzm
2020-09-07 15:09:47 +08:00
parent d10f7a6d7a
commit 6509ed6e99
+1 -1
View File
@@ -126,7 +126,7 @@ func RawNotify(recipientId []string, isGroup bool, channel notify.TNotifyChannel
msg.Topic = topic
body, _ := getContent(event, "content", channel, data)
if len(body) == 0 {
body = data.String()
body, _ = data.GetString()
}
msg.Msg = body
// log.Debugf("send notification %s %s", topic, body)