about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorOndřej Hruška <ondra@ondrovo.com>2017-09-28 09:18:35 +0200
committerOndřej Hruška <ondra@ondrovo.com>2017-09-28 09:18:35 +0200
commit83bda6c1a813c5aeb131b18a0500fed0c07fa9c2 (patch)
tree32f197901b4b16ea7f94de682fee6cdc44686045 /app/models/status.rb
parentfcf0d2078ea813e0dd318fa154d620018e7b7bcf (diff)
parentb9f59ebcc68e9da0a7158741a1a2ef3564e1321e (diff)
Merge commit 'b9f59ebcc68e9da0a7158741a1a2ef3564e1321e' into merging-upstream
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 326d128d6..ea4c097bf 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -30,7 +30,6 @@ class Status < ApplicationRecord
   include Streamable
   include Cacheable
   include StatusThreadingConcern
-  include EmojiHelper
 
   enum visibility: [:public, :unlisted, :private, :direct], _suffix: :visibility
 
@@ -132,7 +131,7 @@ class Status < ApplicationRecord
   end
 
   def emojis
-    CustomEmoji.from_text(text, account.domain)
+    CustomEmoji.from_text([spoiler_text, text].join(' '), account.domain)
   end
 
   after_create :store_uri, if: :local?
@@ -146,7 +145,7 @@ class Status < ApplicationRecord
 
   class << self
     def not_in_filtered_languages(account)
-      where.not(language: account.filtered_languages)
+      where(language: nil).or where.not(language: account.filtered_languages)
     end
 
     def as_home_timeline(account)
@@ -267,9 +266,6 @@ class Status < ApplicationRecord
   def prepare_contents
     text&.strip!
     spoiler_text&.strip!
-
-    self.text         = emojify(text)
-    self.spoiler_text = emojify(spoiler_text)
   end
 
   def set_reblog