Skip to content

Commit

Permalink
update conversation logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Aug 22, 2024
1 parent 041578d commit d6f147d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions internal/rpc/conversation/conversaion.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,21 +289,18 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver
unequal := len(m)

if req.Conversation.RecvMsgOpt != nil {
m["recv_msg_opt"] = req.Conversation.RecvMsgOpt.Value
if req.Conversation.RecvMsgOpt.Value != conversationMap[userID].RecvMsgOpt {
unequal--
}
}

if req.Conversation.AttachedInfo != nil {
m["attached_info"] = req.Conversation.AttachedInfo.Value
if req.Conversation.AttachedInfo.Value != conversationMap[userID].AttachedInfo {
unequal--
}
}

if req.Conversation.Ex != nil {
m["ex"] = req.Conversation.Ex.Value
if req.Conversation.Ex.Value != conversationMap[userID].Ex {
unequal--
}
Expand All @@ -316,28 +313,24 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver
}

if req.Conversation.GroupAtType != nil {
m["group_at_type"] = req.Conversation.GroupAtType.Value
if req.Conversation.GroupAtType.Value != conversationMap[userID].GroupAtType {
unequal--
}
}

if req.Conversation.MsgDestructTime != nil {
m["msg_destruct_time"] = req.Conversation.MsgDestructTime.Value
if req.Conversation.MsgDestructTime.Value != conversationMap[userID].MsgDestructTime {
unequal--
}
}

if req.Conversation.IsMsgDestruct != nil {
m["is_msg_destruct"] = req.Conversation.IsMsgDestruct.Value
if req.Conversation.IsMsgDestruct.Value != conversationMap[userID].IsMsgDestruct {
unequal--
}
}

if req.Conversation.BurnDuration != nil {
m["burn_duration"] = req.Conversation.BurnDuration.Value
if req.Conversation.BurnDuration.Value != conversationMap[userID].BurnDuration {
unequal--
}
Expand Down

0 comments on commit d6f147d

Please sign in to comment.