Files
open-im-server/pkg/common/callback/callback.go
T

19 lines
469 B
Go
Raw Normal View History

2022-08-04 14:21:03 +08:00
package callback
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)
2022-08-04 16:27:39 +08:00
content := tips.JsonDetail
2022-08-04 14:21:03 +08:00
return content
} else {
return string(msg.Content)
}
}