Commit 1c258538 authored by ThibG's avatar ThibG Committed by Eugen Rochko

Use already-known remote user data if resolving temporarily fails in mentions (#5702)

parent 546257bc
......@@ -17,6 +17,11 @@ class ProcessMentionsService < BaseService
mentioned_account = nil
if mentioned_account.nil?
username, domain = match.first.split('@')
mentioned_account = Account.find_remote(username, domain)
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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment