Fix crash when conversations have no valid participants (#10078)
* Never return empty participants for conversations Fixes #10068 * Fix client-side crash when conversations have no participants
This commit is contained in:
@ -30,7 +30,8 @@ class AccountConversation < ApplicationRecord
|
||||
if participant_account_ids.empty?
|
||||
[account]
|
||||
else
|
||||
Account.where(id: participant_account_ids)
|
||||
participants = Account.where(id: participant_account_ids)
|
||||
participants.empty? ? [account] : participants
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user