FIX: removes destroyed mentioned used (#21841)

This would generate a 500 as we would call id on a nil object.
This commit is contained in:
Joffrey JAFFEUX 2023-05-31 00:21:09 +02:00 committed by GitHub
parent e3e7b080c6
commit 6c3a51328c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ module Chat
object
.chat_mentions
.map(&:user)
.compact
.sort_by(&:id)
.map { |user| BasicUserWithStatusSerializer.new(user, root: false) }
.as_json