You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
466 B
19 lines
466 B
2 years ago
|
package utils
|
||
2 years ago
|
|
||
|
import (
|
||
|
"Open_IM/pkg/common/constant"
|
||
|
server_api_params "Open_IM/pkg/proto/sdk_ws"
|
||
|
"github.com/golang/protobuf/proto"
|
||
|
)
|
||
|
|
||
|
func GetContent(msg *server_api_params.MsgData) string {
|
||
|
if msg.ContentType >= constant.NotificationBegin && msg.ContentType <= constant.NotificationEnd {
|
||
|
var tips server_api_params.TipsComm
|
||
|
_ = proto.Unmarshal(msg.Content, &tips)
|
||
2 years ago
|
content := tips.JsonDetail
|
||
2 years ago
|
return content
|
||
|
} else {
|
||
|
return string(msg.Content)
|
||
|
}
|
||
|
}
|