mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-31 20:09:19 +08:00
callback update
This commit is contained in:
parent
a7f44b6ce7
commit
f5ed0be023
@ -9,6 +9,7 @@ import (
|
|||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
pbMsg "Open_IM/pkg/proto/msg"
|
pbMsg "Open_IM/pkg/proto/msg"
|
||||||
server_api_params "Open_IM/pkg/proto/sdk_ws"
|
server_api_params "Open_IM/pkg/proto/sdk_ws"
|
||||||
|
"Open_IM/pkg/utils"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/Shopify/sarama"
|
"github.com/Shopify/sarama"
|
||||||
|
|
||||||
@ -54,6 +55,10 @@ func (mmc *ModifyMsgConsumerHandler) ModifyMsg(cMsg *sarama.ConsumerMessage, msg
|
|||||||
}
|
}
|
||||||
log.Debug(msgFromMQ.TriggerID, "proto.Unmarshal MsgDataToMQ", msgFromMQ.String())
|
log.Debug(msgFromMQ.TriggerID, "proto.Unmarshal MsgDataToMQ", msgFromMQ.String())
|
||||||
for _, msgDataToMQ := range msgFromMQ.MessageList {
|
for _, msgDataToMQ := range msgFromMQ.MessageList {
|
||||||
|
isReactionFromCache := utils.GetSwitchFromOptions(msgDataToMQ.MsgData.Options, constant.IsReactionFromCache)
|
||||||
|
if !isReactionFromCache {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if msgDataToMQ.MsgData.ContentType == constant.ReactionMessageModifier {
|
if msgDataToMQ.MsgData.ContentType == constant.ReactionMessageModifier {
|
||||||
notification := &base_info.ReactionMessageModifierNotification{}
|
notification := &base_info.ReactionMessageModifierNotification{}
|
||||||
if err := json.Unmarshal(msgDataToMQ.MsgData.Content, notification); err != nil {
|
if err := json.Unmarshal(msgDataToMQ.MsgData.Content, notification); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user