feat: GetConversationsHasReadAndMaxSeq support pinned

This commit is contained in:
withchao 2025-04-14 11:10:49 +08:00
parent 04997b888e
commit 025b2ae189
2 changed files with 4 additions and 4 deletions

View File

@ -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
}

View File

@ -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)
}