From c4005a0b25841dcc6c45aea97ed7acc7aeb12955 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Thu, 1 Aug 2019 14:56:49 -0500 Subject: [PATCH] fix tag extraction failing on text in frozen state --- app/services/post_status_service.rb | 2 ++ 1 file changed, 2 insertions(+) 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)