about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-08-01 14:56:49 -0500
committermultiple creatures <dev@multiple-creature.party>2019-08-01 14:56:49 -0500
commitc4005a0b25841dcc6c45aea97ed7acc7aeb12955 (patch)
treeb57d1df1660f552edc85cc70499eec2673b022f6 /app
parent720207cf4b6d4db5e9b0ba10ad8b9b59ce730784 (diff)
fix tag extraction failing on text in frozen state
Diffstat (limited to 'app')
-rw-r--r--app/services/post_status_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index e8f785db5..cc42289d8 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -113,6 +113,8 @@ class PostStatusService < BaseService
 
   # move tags out of body so we can format them later
   def extract_tags
+    return unless '#'.in?(@text)
+    @text = @text.dup if @text.frozen?
     @text.gsub!(/^##/, "\uf666")
     @text.gsub!('##', "\uf669")
     @tags |= Extractor.extract_hashtags(@text)