diff options
author | ThibG <thib@sitedethib.com> | 2017-11-15 01:06:49 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-11-15 01:06:49 +0100 |
commit | 1c25853842075f88e3b6ed28decba3907d548f2e (patch) | |
tree | 2f96a8ccce89bc742c9e0572f8a91587da5c1341 /app/services | |
parent | 546257bc7f75538993470b1a53f2095f801c069d (diff) |
Use already-known remote user data if resolving temporarily fails in mentions (#5702)
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/process_mentions_service.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb index c1ff68209..a229d4ff8 100644 --- a/app/services/process_mentions_service.rb +++ b/app/services/process_mentions_service.rb @@ -17,6 +17,11 @@ class ProcessMentionsService < BaseService mentioned_account = nil end + if mentioned_account.nil? + username, domain = match.first.split('@') + mentioned_account = Account.find_remote(username, domain) + end + next match if mentioned_account.nil? || (!mentioned_account.local? && mentioned_account.ostatus? && status.stream_entry.hidden?) mentioned_account.mentions.where(status: status).first_or_create(status: status) |