diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-24 13:01:12 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-24 13:01:12 -0500 |
commit | 25d628fca314aebb25e3976f006cc96629a3d780 (patch) | |
tree | bb4304947f7727264038b90b0e48a9783a1f30ff /app/lib/activitypub/activity | |
parent | d83fcfd1f15a97bfb5c6f36a82d7253175518daf (diff) |
revert the current unfinished chat implementation
Diffstat (limited to 'app/lib/activitypub/activity')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 94cde4bd6..1c20d3844 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -159,9 +159,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity def attach_tags(status) @tags.each do |tag| status.tags << tag - tag.chatters.find_or_create_by(account_id: status.account) if tag.chat? - next unless status.distributable? && !tag.chat? - TrendingTags.record_use!(tag, status.account, status.created_at) + TrendingTags.record_use!(tag, status.account, status.created_at) if status.distributable? end @mentions.each do |mention| @@ -190,15 +188,10 @@ class ActivityPub::Activity::Create < ActivityPub::Activity hashtag = tag['name'].gsub(/\A#/, '').gsub(':', '.').mb_chars.downcase return if !@options[:imported] && ( - hashtag.in?(%w(self .self local .local chat.local .chat.local)) || - hashtag.starts_with?('self.', '.self', 'local.', '.local', 'chat.local.', '.chat.local.') + hashtag.in?(%w(self .self local .local)) || + hashtag.starts_with?('self.', '.self', 'local.', '.local') ) - if tag['name'].starts_with?('chat.', '.chat.') - @params[:visibility] = :chat - @params[:thread] = nil - end - hashtag = Tag.where(name: hashtag).first_or_create!(name: hashtag) return if @tags.include?(hashtag) |