DEV: Add explicit order for chat mentioned users (#21765)

Followup d4a5b79592
which could sometimes flake on tests due to ordering issues.
This commit is contained in:
Martin Brennan 2023-05-26 11:47:55 +02:00 committed by GitHub
parent dab37c1a5a
commit 39d213a023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ module Chat
def mentioned_users
User
.where(id: object.chat_mentions.pluck(:user_id))
.order("users.id ASC")
.map { |user| BasicUserWithStatusSerializer.new(user, root: false) }
.as_json
end