diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-02 10:01:54 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:17 -0500 |
commit | af7003412cf6ed581fd190f3ae7ee979a078d483 (patch) | |
tree | cb6c91320e0780c0f5a202f4ca620405b7fa3113 /app/services | |
parent | 5f2e372cf580307843e0fc813f7ddd7e3c0a0906 (diff) |
[Bug] Include mentions already attached to status in result set
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/resolve_mentions_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/resolve_mentions_service.rb b/app/services/resolve_mentions_service.rb index 176caa8fe..2fcb176b2 100644 --- a/app/services/resolve_mentions_service.rb +++ b/app/services/resolve_mentions_service.rb @@ -8,7 +8,7 @@ class ResolveMentionsService < BaseService # @option [Boolean] :reveal_implicit_mentions Append implicit mentions to text # @return [Array] Array containing text with mentions resolved (String) and mention pointers (Set) def call(status, text: nil, mentions: [], reveal_implicit_mentions: true) - mentions = Mention.includes(:account).where(id: mentions.pluck(:id), accounts: { suspended_at: nil }) + mentions = Mention.includes(:account).where(id: mentions.pluck(:id), accounts: { suspended_at: nil }).or(status.mentions.includes(:account)) implicit_mention_acct_ids = mentions.active.pluck(:account_id).to_set text = status.text if text.nil? mentions = mentions.to_set |