diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index 8b694536c..533cbb8e5 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -208,8 +208,9 @@ class Formatter
def link_to_mention(entity, linkable_accounts)
acct = entity[:screen_name]
+ username, domain = acct.split('@')
- return link_to_account(acct) unless linkable_accounts
+ return link_to_account(acct) unless linkable_accounts and domain != "twitter.com"
account = linkable_accounts.find { |item| TagManager.instance.same_acct?(item.acct, acct) }
account ? mention_html(account) : "@#{acct}"
@@ -218,6 +219,10 @@ class Formatter
def link_to_account(acct)
username, domain = acct.split('@')
+ if domain == "twitter.com"
+ return mention_twitter_html(username)
+ end
+
domain = nil if TagManager.instance.local_domain?(domain)
account = EntityCache.instance.mention(username, domain)
@@ -245,4 +250,8 @@ class Formatter
def mention_html(account)
"@#{account.username}"
end
+
+ def mention_twitter_html(username)
+ "@#{username}@twitter.com"
+ end
end