|
|
@ -181,14 +181,23 @@ func (m *msgServer) MarkConversationAsRead(ctx context.Context, req *msg.MarkCon
|
|
|
|
req.UserID, seqs, hasReadSeq)
|
|
|
|
req.UserID, seqs, hasReadSeq)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
reqCall := &cbapi.CallbackGroupMsgReadReq{
|
|
|
|
if conversation.ConversationType == constant.SingleChatType {
|
|
|
|
SendID: conversation.OwnerUserID,
|
|
|
|
reqCall := &cbapi.CallbackSingleMsgReadReq{
|
|
|
|
ReceiveID: req.UserID,
|
|
|
|
ConversationID: conversation.ConversationID,
|
|
|
|
UnreadMsgNum: req.HasReadSeq,
|
|
|
|
UserID: conversation.OwnerUserID,
|
|
|
|
ContentType: int64(conversation.ConversationType),
|
|
|
|
Seqs: req.Seqs,
|
|
|
|
|
|
|
|
ContentType: conversation.ConversationType,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
m.webhookAfterSingleMsgRead(ctx, &m.config.WebhooksConfig.AfterSingleMsgRead, reqCall)
|
|
|
|
|
|
|
|
} else if conversation.ConversationType == constant.ReadGroupChatType {
|
|
|
|
|
|
|
|
reqCall := &cbapi.CallbackGroupMsgReadReq{
|
|
|
|
|
|
|
|
SendID: conversation.OwnerUserID,
|
|
|
|
|
|
|
|
ReceiveID: req.UserID,
|
|
|
|
|
|
|
|
UnreadMsgNum: req.HasReadSeq,
|
|
|
|
|
|
|
|
ContentType: int64(conversation.ConversationType),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
m.webhookAfterGroupMsgRead(ctx, &m.config.WebhooksConfig.AfterGroupMsgRead, reqCall)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m.webhookAfterGroupMsgRead(ctx, &m.config.WebhooksConfig.AfterGroupMsgRead, reqCall)
|
|
|
|
|
|
|
|
return &msg.MarkConversationAsReadResp{}, nil
|
|
|
|
return &msg.MarkConversationAsReadResp{}, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|