From 141a3d8a017cd353ca3c577b3996ad8248eee52d Mon Sep 17 00:00:00 2001 From: noellabo Date: Mon, 13 Jul 2020 04:32:45 +0900 Subject: [PATCH] Add className group in mention --- app/lib/entity_cache.rb | 2 +- app/lib/formatter.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/entity_cache.rb b/app/lib/entity_cache.rb index 80b0046ee..72080e23f 100644 --- a/app/lib/entity_cache.rb +++ b/app/lib/entity_cache.rb @@ -12,7 +12,7 @@ class EntityCache end def mention(username, domain) - Rails.cache.fetch(to_key(:mention, username, domain), expires_in: MAX_EXPIRATION) { Account.select(:id, :username, :domain, :url).find_remote(username, domain) } + Rails.cache.fetch(to_key(:mention, username, domain), expires_in: MAX_EXPIRATION) { Account.select(:id, :username, :domain, :url, :actor_type).find_remote(username, domain) } end def emoji(shortcodes, domain) diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index f56701a6d..1dfe5d4f3 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -305,6 +305,6 @@ class Formatter end def mention_html(account, with_domain: false) - "@#{encode(with_domain ? account.pretty_acct : account.username)}" + "@#{encode(with_domain ? account.pretty_acct : account.username)}" end end