mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-03 01:52:17 +08:00
update conversation logic.
This commit is contained in:
parent
041578d16e
commit
d6f147d4d4
@ -289,21 +289,18 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver
|
|||||||
unequal := len(m)
|
unequal := len(m)
|
||||||
|
|
||||||
if req.Conversation.RecvMsgOpt != nil {
|
if req.Conversation.RecvMsgOpt != nil {
|
||||||
m["recv_msg_opt"] = req.Conversation.RecvMsgOpt.Value
|
|
||||||
if req.Conversation.RecvMsgOpt.Value != conversationMap[userID].RecvMsgOpt {
|
if req.Conversation.RecvMsgOpt.Value != conversationMap[userID].RecvMsgOpt {
|
||||||
unequal--
|
unequal--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Conversation.AttachedInfo != nil {
|
if req.Conversation.AttachedInfo != nil {
|
||||||
m["attached_info"] = req.Conversation.AttachedInfo.Value
|
|
||||||
if req.Conversation.AttachedInfo.Value != conversationMap[userID].AttachedInfo {
|
if req.Conversation.AttachedInfo.Value != conversationMap[userID].AttachedInfo {
|
||||||
unequal--
|
unequal--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Conversation.Ex != nil {
|
if req.Conversation.Ex != nil {
|
||||||
m["ex"] = req.Conversation.Ex.Value
|
|
||||||
if req.Conversation.Ex.Value != conversationMap[userID].Ex {
|
if req.Conversation.Ex.Value != conversationMap[userID].Ex {
|
||||||
unequal--
|
unequal--
|
||||||
}
|
}
|
||||||
@ -316,28 +313,24 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver
|
|||||||
}
|
}
|
||||||
|
|
||||||
if req.Conversation.GroupAtType != nil {
|
if req.Conversation.GroupAtType != nil {
|
||||||
m["group_at_type"] = req.Conversation.GroupAtType.Value
|
|
||||||
if req.Conversation.GroupAtType.Value != conversationMap[userID].GroupAtType {
|
if req.Conversation.GroupAtType.Value != conversationMap[userID].GroupAtType {
|
||||||
unequal--
|
unequal--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Conversation.MsgDestructTime != nil {
|
if req.Conversation.MsgDestructTime != nil {
|
||||||
m["msg_destruct_time"] = req.Conversation.MsgDestructTime.Value
|
|
||||||
if req.Conversation.MsgDestructTime.Value != conversationMap[userID].MsgDestructTime {
|
if req.Conversation.MsgDestructTime.Value != conversationMap[userID].MsgDestructTime {
|
||||||
unequal--
|
unequal--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Conversation.IsMsgDestruct != nil {
|
if req.Conversation.IsMsgDestruct != nil {
|
||||||
m["is_msg_destruct"] = req.Conversation.IsMsgDestruct.Value
|
|
||||||
if req.Conversation.IsMsgDestruct.Value != conversationMap[userID].IsMsgDestruct {
|
if req.Conversation.IsMsgDestruct.Value != conversationMap[userID].IsMsgDestruct {
|
||||||
unequal--
|
unequal--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Conversation.BurnDuration != nil {
|
if req.Conversation.BurnDuration != nil {
|
||||||
m["burn_duration"] = req.Conversation.BurnDuration.Value
|
|
||||||
if req.Conversation.BurnDuration.Value != conversationMap[userID].BurnDuration {
|
if req.Conversation.BurnDuration.Value != conversationMap[userID].BurnDuration {
|
||||||
unequal--
|
unequal--
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user