(msg *sdkws.MsgData)
| 137 | } |
| 138 | |
| 139 | func GetContent(msg *sdkws.MsgData) string { |
| 140 | if msg.ContentType >= constant.NotificationBegin && msg.ContentType <= constant.NotificationEnd { |
| 141 | var notification sdkws.NotificationElem |
| 142 | if err := json.Unmarshal(msg.Content, ¬ification); err != nil { |
| 143 | return "" |
| 144 | } |
| 145 | return notification.Detail |
| 146 | } else { |
| 147 | return string(msg.Content) |
| 148 | } |
| 149 | } |
no test coverage detected