fix(message): add missing BatchDecryptMessagesParallel in GetLastMessagesBatch
GetLastMessagesBatch was returning empty segments because it skipped the decryption step that all other message query methods perform. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -933,12 +933,15 @@ func (r *messageRepository) GetLastMessagesBatch(ctx context.Context, convIDs []
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(messages) > 0 {
|
||||||
|
model.BatchDecryptMessagesParallel(messages)
|
||||||
|
}
|
||||||
|
|
||||||
for _, m := range messages {
|
for _, m := range messages {
|
||||||
result[m.ConversationID] = m
|
result[m.ConversationID] = m
|
||||||
}
|
}
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetParticipantsBatch 批量获取多个会话的参与者列表
|
// GetParticipantsBatch 批量获取多个会话的参与者列表
|
||||||
func (r *messageRepository) GetParticipantsBatch(ctx context.Context, convIDs []string) (map[string][]*model.ConversationParticipant, error) {
|
func (r *messageRepository) GetParticipantsBatch(ctx context.Context, convIDs []string) (map[string][]*model.ConversationParticipant, error) {
|
||||||
result := make(map[string][]*model.ConversationParticipant, len(convIDs))
|
result := make(map[string][]*model.ConversationParticipant, len(convIDs))
|
||||||
|
|||||||
Reference in New Issue
Block a user