fix quit group invite user

This commit is contained in:
wangchuxiao
2023-06-06 16:57:48 +08:00
parent 485abaa8f3
commit 2411f4b8d5
10 changed files with 509 additions and 1110 deletions
+12
View File
@@ -8,6 +8,7 @@ import (
discoveryRegistry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
)
type ConversationClient struct {
@@ -107,3 +108,14 @@ func (c *ConversationClient) GetConversationsByConversationID(ctx context.Contex
}
return resp.Conversations, nil
}
func (c *ConversationClient) SetHasReadSeq(ctx context.Context, userID, conversationID string, conversationType int32, hasReadSeq int64) error {
cc, err := c.getConn(ctx)
if err != nil {
return err
}
_, err = pbConversation.NewConversationClient(cc).SetConversations(ctx, &pbConversation.SetConversationsReq{UserIDs: []string{userID},
Conversation: &pbConversation.ConversationReq{ConversationID: conversationID, ConversationType: conversationType, HasReadSeq: &wrapperspb.Int64Value{Value: hasReadSeq}}})
return err
}