mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix bug
This commit is contained in:
parent
e5d6107795
commit
01adec6003
@ -8,6 +8,7 @@ package logic
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
kfk "Open_IM/pkg/common/kafka"
|
||||
"Open_IM/pkg/common/log"
|
||||
pbChat "Open_IM/pkg/proto/msg"
|
||||
@ -37,8 +38,19 @@ func (ms *PushConsumerHandler) handleMs2PsChat(msg []byte) {
|
||||
log.ErrorByKv("push Unmarshal msg err", "", "msg", string(msg), "err", err.Error())
|
||||
return
|
||||
}
|
||||
pbData := &pbPush.PushMsgReq{
|
||||
OperationID: msgFromMQ.OperationID,
|
||||
MsgData: msgFromMQ.MsgData,
|
||||
PushToUserID: msgFromMQ.PushToUserID,
|
||||
}
|
||||
switch msgFromMQ.MsgData.SessionType {
|
||||
case constant.SuperGroupChatType:
|
||||
MsgToSuperGroupUser(pbData)
|
||||
default:
|
||||
MsgToUser(pbData)
|
||||
}
|
||||
//Call push module to send message to the user
|
||||
MsgToUser((*pbPush.PushMsgReq)(&msgFromMQ))
|
||||
//MsgToUser((*pbPush.PushMsgReq)(&msgFromMQ))
|
||||
}
|
||||
func (PushConsumerHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil }
|
||||
func (PushConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil }
|
||||
|
Loading…
x
Reference in New Issue
Block a user