mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 21:16:00 +08:00
fix bug: init conn once
This commit is contained in:
@@ -26,10 +26,7 @@ import (
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
||||
)
|
||||
|
||||
func (m *msgServer) GetConversationsHasReadAndMaxSeq(
|
||||
ctx context.Context,
|
||||
req *msg.GetConversationsHasReadAndMaxSeqReq,
|
||||
) (*msg.GetConversationsHasReadAndMaxSeqResp, error) {
|
||||
func (m *msgServer) GetConversationsHasReadAndMaxSeq(ctx context.Context, req *msg.GetConversationsHasReadAndMaxSeqReq) (*msg.GetConversationsHasReadAndMaxSeqResp, error) {
|
||||
conversationIDs, err := m.ConversationLocalCache.GetConversationIDs(ctx, req.UserID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -124,24 +124,3 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.
|
||||
}
|
||||
return &msg.RevokeMsgResp{}, nil
|
||||
}
|
||||
|
||||
func (m *msgServer) ManageMsg(ctx context.Context, req *msg.ManageMsgReq) (*msg.ManageMsgResp, error) {
|
||||
resp := &msg.ManageMsgResp{}
|
||||
msgData := &sdkws.MsgData{
|
||||
SendID: req.SendID,
|
||||
RecvID: req.RecvID,
|
||||
SessionType: req.SessionType,
|
||||
GroupID: req.GroupID,
|
||||
}
|
||||
conversationID := utils.GetChatConversationIDByMsg(msgData)
|
||||
revokeReq := &msg.RevokeMsgReq{
|
||||
ConversationID: conversationID,
|
||||
Seq: req.Seq,
|
||||
UserID: req.SendID,
|
||||
}
|
||||
_, err := m.RevokeMsg(ctx, revokeReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user