diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/components/display_name.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/components/status.js | 2 | ||||
-rw-r--r-- | app/models/account_conversation.rb | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/mastodon/components/display_name.js b/app/javascript/mastodon/components/display_name.js index 32809778a..6b9dd6f81 100644 --- a/app/javascript/mastodon/components/display_name.js +++ b/app/javascript/mastodon/components/display_name.js @@ -22,7 +22,7 @@ export default class DisplayName extends React.PureComponent { suffix = `+${others.size - 2}`; } } else { - if (others) { + if (others && others.size > 0) { account = others.first(); } else { account = this.props.account; diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 3e98d374b..6270d3c92 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -326,7 +326,7 @@ class Status extends ImmutablePureComponent { ); } - 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} />; diff --git a/app/models/account_conversation.rb b/app/models/account_conversation.rb index cc6b39279..0c03747e2 100644 --- a/app/models/account_conversation.rb +++ b/app/models/account_conversation.rb @@ -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 |