* Never return empty participants for conversations
Fixes #10068
* Fix client-side crash when conversations have no participants
suffix = `+${others.size - 2}`;
}
} else {
- if (others) {
+ if (others && others.size > 0) {
account = others.first();
} else {
account = this.props.account;
);
}
- if (otherAccounts) {
+ if (otherAccounts && otherAccounts.size > 0) {
statusAvatar = <AvatarComposite accounts={otherAccounts} size={48} />;
} else if (account === undefined || account === null) {
statusAvatar = <Avatar account={status.get('account')} size={48} />;
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