about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/lib/bangtags.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index 3441b7464..e6fcb62e4 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -226,10 +226,13 @@ class Bangtags
           case cmd[1].downcase
           when 'reall'
             if status.conversation_id.present?
-              mention_ids = Status.where(conversation_id: status.conversation_id).flat_map { |s| s.mentions.pluck(:account_id) }
-              mention_ids.uniq!
-              mentions = Account.where(id: mention_ids).map { |a| "@#{a.username}" }
-              chunk = mentions.join(' ')
+              participants = Status.where(conversation_id: status.conversation_id)
+                .pluck(:account_id).uniq.without(@account.id)
+              participants = Account.where(id: participants)
+                .pluck(:username, :domain)
+                .map { |a| "@#{a.compact.join('@')}" }
+              participants = (cmd[2..-1].map(&:strip) | participants) unless cmd[2].nil?
+              chunk = participants.join(' ')
             end
           when 'sharekey'
             next if cmd[2].nil?