From 025b2ae18912238f3e6ec1cc5afdf8d9cac34f12 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 14 Apr 2025 11:10:49 +0800 Subject: [PATCH] feat: GetConversationsHasReadAndMaxSeq support pinned --- internal/rpc/msg/as_read.go | 2 +- pkg/rpccache/conversation.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/rpc/msg/as_read.go b/internal/rpc/msg/as_read.go index 7d23ec67e..b25eae6b1 100644 --- a/internal/rpc/msg/as_read.go +++ b/internal/rpc/msg/as_read.go @@ -62,7 +62,7 @@ func (m *msgServer) GetConversationsHasReadAndMaxSeq(ctx context.Context, req *m } resp := &msg.GetConversationsHasReadAndMaxSeqResp{Seqs: make(map[string]*msg.Seqs)} if req.ReturnPinned { - pinnedConversationIDs, err := m.ConversationLocalCache.GetPinnedConversations(ctx, req.UserID) + pinnedConversationIDs, err := m.ConversationLocalCache.GetPinnedConversationIDs(ctx, req.UserID) if err != nil { return nil, err } diff --git a/pkg/rpccache/conversation.go b/pkg/rpccache/conversation.go index 1ecaa7595..162fda596 100644 --- a/pkg/rpccache/conversation.go +++ b/pkg/rpccache/conversation.go @@ -154,7 +154,7 @@ func (c *ConversationLocalCache) getConversationNotReceiveMessageUserIDs(ctx con })) } -func (c *ConversationLocalCache) getPinnedConversations(ctx context.Context, userID string) (val []string, err error) { +func (c *ConversationLocalCache) getPinnedConversationIDs(ctx context.Context, userID string) (val []string, err error) { log.ZDebug(ctx, "ConversationLocalCache getPinnedConversations req", "userID", userID) defer func() { if err == nil { @@ -190,6 +190,6 @@ func (c *ConversationLocalCache) GetConversationNotReceiveMessageUserIDMap(ctx c return datautil.SliceSet(res.UserIDs), nil } -func (c *ConversationLocalCache) GetPinnedConversations(ctx context.Context, userID string) ([]string, error) { - return c.getPinnedConversations(ctx, userID) +func (c *ConversationLocalCache) GetPinnedConversationIDs(ctx context.Context, userID string) ([]string, error) { + return c.getPinnedConversationIDs(ctx, userID) }