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:
parent
e3e7b080c6
commit
6c3a51328c
|
@ -30,6 +30,7 @@ module Chat
|
||||||
object
|
object
|
||||||
.chat_mentions
|
.chat_mentions
|
||||||
.map(&:user)
|
.map(&:user)
|
||||||
|
.compact
|
||||||
.sort_by(&:id)
|
.sort_by(&:id)
|
||||||
.map { |user| BasicUserWithStatusSerializer.new(user, root: false) }
|
.map { |user| BasicUserWithStatusSerializer.new(user, root: false) }
|
||||||
.as_json
|
.as_json
|
||||||
|
|
Loading…
Reference in New Issue