From 64e1361ef5a8f8549a98e04fdfe9099e56d52564 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 16 Aug 2022 23:08:16 +0800 Subject: [PATCH] fix signal bug --- internal/push/logic/push_to_client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index fa4f8afb2..c22b26827 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -20,8 +20,9 @@ import ( "Open_IM/pkg/utils" "context" "encoding/json" - "github.com/golang/protobuf/proto" "strings" + + "github.com/golang/protobuf/proto" ) type OpenIMContent struct { @@ -94,8 +95,8 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) { var content string if pushMsg.MsgData.OfflinePushInfo != nil { content = pushMsg.MsgData.OfflinePushInfo.Title - - } else { + } + if content == "" { switch pushMsg.MsgData.ContentType { case constant.Text: content = constant.ContentType2PushContent[constant.Text]