From 6509ed6e9947cf42ef2f1342468d15b2b76d9802 Mon Sep 17 00:00:00 2001 From: rainzm Date: Mon, 7 Sep 2020 11:21:44 +0800 Subject: [PATCH] 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. --- pkg/cloudcommon/notifyclient/notify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cloudcommon/notifyclient/notify.go b/pkg/cloudcommon/notifyclient/notify.go index b96cb924d3..218593910a 100644 --- a/pkg/cloudcommon/notifyclient/notify.go +++ b/pkg/cloudcommon/notifyclient/notify.go @@ -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)