logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 1c25853842075f88e3b6ed28decba3907d548f2e
parent: 546257bc7f75538993470b1a53f2095f801c069d
Author: ThibG <thib@sitedethib.com>
Date:   Wed, 15 Nov 2017 01:06:49 +0100

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


Diffstat:

Mapp/services/process_mentions_service.rb5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git 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)