about summary refs log tree commit diff
path: root/app/models/account_conversation.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-02-19 22:42:22 +0100
committerGitHub <noreply@github.com>2019-02-19 22:42:22 +0100
commit787449c12f121737c4319ec274300fa9a330fe9b (patch)
tree766b37f3f093f3882aba2258ebc2748325edcfcb /app/models/account_conversation.rb
parent896beb16c5318b8ce59867a06545ae6a00ccc84c (diff)
parentff0576cc2b046694dd8960608ce2f40e32a0ab78 (diff)
Merge pull request #925 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/account_conversation.rb')
-rw-r--r--app/models/account_conversation.rb3
1 files changed, 2 insertions, 1 deletions
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