re: remove router of unsubscribeStatus.

pull/1254/head
Gordon 2 years ago
parent e0aab8a210
commit ab8f5e9e98

@ -62,7 +62,7 @@ func (mc *OnlineHistoryMongoConsumerHandler) handleChatWs2Mongo(
log.ZError(ctx, "msgFromMQ.MsgData is empty", nil, "cMsg", cMsg) log.ZError(ctx, "msgFromMQ.MsgData is empty", nil, "cMsg", cMsg)
return return
} }
log.ZInfo(ctx, "mongo consumer recv msg", "msgs", msgFromMQ) log.ZInfo(ctx, "mongo consumer recv msg", "msgs", msgFromMQ.String())
err = mc.msgDatabase.BatchInsertChat2DB(ctx, msgFromMQ.ConversationID, msgFromMQ.MsgData, msgFromMQ.LastSeq) err = mc.msgDatabase.BatchInsertChat2DB(ctx, msgFromMQ.ConversationID, msgFromMQ.MsgData, msgFromMQ.LastSeq)
if err != nil { if err != nil {
log.ZError( log.ZError(

@ -130,6 +130,7 @@ func (p *Pusher) UnmarshalNotificationElem(bytes []byte, t interface{}) error {
if err := json.Unmarshal(bytes, &notification); err != nil { if err := json.Unmarshal(bytes, &notification); err != nil {
return err return err
} }
return json.Unmarshal([]byte(notification.Detail), t) return json.Unmarshal([]byte(notification.Detail), t)
} }

@ -112,6 +112,7 @@ func (c *conversationServer) SetConversation(ctx context.Context, req *pbconvers
return resp, nil return resp, nil
} }
//gocognit:ignore
func (c *conversationServer) SetConversations(ctx context.Context, func (c *conversationServer) SetConversations(ctx context.Context,
req *pbconversation.SetConversationsReq, req *pbconversation.SetConversationsReq,
) (*pbconversation.SetConversationsResp, error) { ) (*pbconversation.SetConversationsResp, error) {
@ -204,6 +205,7 @@ func (c *conversationServer) SetConversations(ctx context.Context,
if err != nil { if err != nil {
log.ZWarn(ctx, "send conversation set private notification failed", err, log.ZWarn(ctx, "send conversation set private notification failed", err,
"userID", userID, "conversationID", req.Conversation.ConversationID) "userID", userID, "conversationID", req.Conversation.ConversationID)
continue continue
} }
} }

@ -236,8 +236,9 @@ func (s *NotificationSender) NotificationWithSesstionType(ctx context.Context, s
} }
var req msg.SendMsgReq var req msg.SendMsgReq
var msg sdkws.MsgData var msg sdkws.MsgData
var userInfo *sdkws.UserInfo
if notificationOpt.WithRpcGetUsername && s.getUserInfo != nil { if notificationOpt.WithRpcGetUsername && s.getUserInfo != nil {
userInfo, err := s.getUserInfo(ctx, sendID) userInfo, err = s.getUserInfo(ctx, sendID)
if err != nil { if err != nil {
log.ZWarn(ctx, "getUserInfo failed", err, "sendID", sendID) log.ZWarn(ctx, "getUserInfo failed", err, "sendID", sendID)
} else { } else {

Loading…
Cancel
Save