fix signal bug

This commit is contained in:
wangchuxiao 2022-08-16 23:08:16 +08:00
parent 2f6eb5969e
commit 64e1361ef5

View File

@ -20,8 +20,9 @@ import (
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"encoding/json" "encoding/json"
"github.com/golang/protobuf/proto"
"strings" "strings"
"github.com/golang/protobuf/proto"
) )
type OpenIMContent struct { type OpenIMContent struct {
@ -94,8 +95,8 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
var content string var content string
if pushMsg.MsgData.OfflinePushInfo != nil { if pushMsg.MsgData.OfflinePushInfo != nil {
content = pushMsg.MsgData.OfflinePushInfo.Title content = pushMsg.MsgData.OfflinePushInfo.Title
}
} else { if content == "" {
switch pushMsg.MsgData.ContentType { switch pushMsg.MsgData.ContentType {
case constant.Text: case constant.Text:
content = constant.ContentType2PushContent[constant.Text] content = constant.ContentType2PushContent[constant.Text]