pull/455/head
wangchuxiao 2 years ago committed by Xinwei Xiong(cubxxw-openim)
parent e5d6107795
commit 01adec6003

@ -8,6 +8,7 @@ package logic
import ( import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
kfk "Open_IM/pkg/common/kafka" kfk "Open_IM/pkg/common/kafka"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
pbChat "Open_IM/pkg/proto/msg" 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()) log.ErrorByKv("push Unmarshal msg err", "", "msg", string(msg), "err", err.Error())
return 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 //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) Setup(_ sarama.ConsumerGroupSession) error { return nil }
func (PushConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } func (PushConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil }

Loading…
Cancel
Save