From 25d628fca314aebb25e3976f006cc96629a3d780 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Wed, 24 Jul 2019 13:01:12 -0500 Subject: revert the current unfinished chat implementation --- app/services/process_hashtags_service.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'app/services/process_hashtags_service.rb') diff --git a/app/services/process_hashtags_service.rb b/app/services/process_hashtags_service.rb index fff4f5db1..15d78f690 100644 --- a/app/services/process_hashtags_service.rb +++ b/app/services/process_hashtags_service.rb @@ -13,20 +13,13 @@ class ProcessHashtagsService < BaseService name.gsub!(/[:.]+/, '.') next if name.blank? || name == '.' - chat = name.starts_with?('chat.', '.chat.') - if chat - component_indices = [name.size - 1] - else - component_indices = 1.upto(name.size).select { |i| name[i] == '.' } - component_indices << name.size - 1 - end + component_indices = 1.upto(name.size).select { |i| name[i] == '.' } + component_indices << name.size - 1 component_indices.take(6).each_with_index do |i, nest| frag = (nest != 5) ? name[0..i] : name tag = Tag.where(name: frag).first_or_create(name: frag) - tag.chatters.find_or_create_by(id: status.account_id) if chat - next if status.tags.include?(tag) status.tags << tag next if tag.unlisted || component_indices.size > 1 -- cgit