about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account_suggestions/global_source.rb2
-rw-r--r--app/models/status_edit.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/models/account_suggestions/global_source.rb b/app/models/account_suggestions/global_source.rb
index 03ed1b6c2..7bca530d4 100644
--- a/app/models/account_suggestions/global_source.rb
+++ b/app/models/account_suggestions/global_source.rb
@@ -6,7 +6,7 @@ class AccountSuggestions::GlobalSource < AccountSuggestions::Source
   end
 
   def get(account, skip_account_ids: [], limit: 40)
-    account_ids = account_ids_for_locale(I18n.locale.to_str.split(/[_-]/).first) - [account.id] - skip_account_ids
+    account_ids = account_ids_for_locale(I18n.locale.to_s.split(/[_-]/).first) - [account.id] - skip_account_ids
 
     as_ordered_suggestions(
       scope(account).where(id: account_ids),
diff --git a/app/models/status_edit.rb b/app/models/status_edit.rb
index a89df86c5..6e88864e8 100644
--- a/app/models/status_edit.rb
+++ b/app/models/status_edit.rb
@@ -20,4 +20,9 @@ class StatusEdit < ApplicationRecord
   default_scope { order(id: :asc) }
 
   delegate :local?, to: :status
+
+  def emojis
+    return @emojis if defined?(@emojis)
+    @emojis = CustomEmoji.from_text([spoiler_text, text].join(' '), status.account.domain)
+  end
 end