|
|
@ -13,6 +13,7 @@ import (
|
|
|
|
"Open_IM/pkg/common/log"
|
|
|
|
"Open_IM/pkg/common/log"
|
|
|
|
pbChat "Open_IM/pkg/proto/msg"
|
|
|
|
pbChat "Open_IM/pkg/proto/msg"
|
|
|
|
pbPush "Open_IM/pkg/proto/push"
|
|
|
|
pbPush "Open_IM/pkg/proto/push"
|
|
|
|
|
|
|
|
"Open_IM/pkg/utils"
|
|
|
|
"github.com/Shopify/sarama"
|
|
|
|
"github.com/Shopify/sarama"
|
|
|
|
"github.com/golang/protobuf/proto"
|
|
|
|
"github.com/golang/protobuf/proto"
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -43,6 +44,11 @@ func (ms *PushConsumerHandler) handleMs2PsChat(msg []byte) {
|
|
|
|
MsgData: msgFromMQ.MsgData,
|
|
|
|
MsgData: msgFromMQ.MsgData,
|
|
|
|
PushToUserID: msgFromMQ.PushToUserID,
|
|
|
|
PushToUserID: msgFromMQ.PushToUserID,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sec := msgFromMQ.MsgData.SendTime / 1000
|
|
|
|
|
|
|
|
nowSec := utils.GetCurrentTimestampBySecond()
|
|
|
|
|
|
|
|
if nowSec-sec > 10 {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
switch msgFromMQ.MsgData.SessionType {
|
|
|
|
switch msgFromMQ.MsgData.SessionType {
|
|
|
|
case constant.SuperGroupChatType:
|
|
|
|
case constant.SuperGroupChatType:
|
|
|
|
MsgToSuperGroupUser(pbData)
|
|
|
|
MsgToSuperGroupUser(pbData)
|
|
|
|