diff --git a/internal/repository/message_repo.go b/internal/repository/message_repo.go index 7b78130..9bb7ec8 100644 --- a/internal/repository/message_repo.go +++ b/internal/repository/message_repo.go @@ -933,12 +933,15 @@ func (r *messageRepository) GetLastMessagesBatch(ctx context.Context, convIDs [] return nil, err } + if len(messages) > 0 { + model.BatchDecryptMessagesParallel(messages) + } + for _, m := range messages { result[m.ConversationID] = m } return result, nil } - // GetParticipantsBatch 批量获取多个会话的参与者列表 func (r *messageRepository) GetParticipantsBatch(ctx context.Context, convIDs []string) (map[string][]*model.ConversationParticipant, error) { result := make(map[string][]*model.ConversationParticipant, len(convIDs))