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/services/post_status_service.rb | |
parent | d83fcfd1f15a97bfb5c6f36a82d7253175518daf (diff) |
revert the current unfinished chat implementation
Diffstat (limited to 'app/services/post_status_service.rb')
-rw-r--r-- | app/services/post_status_service.rb | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 65f0c88ce..c26f76a1b 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -13,7 +13,6 @@ class PostStatusService < BaseService 'private' => 2, 'direct' => 3, 'limited' => 3, - 'chat' => 4 } # Post a text status update, fetch and notify remote users mentioned @@ -92,19 +91,6 @@ class PostStatusService < BaseService @local_only = true if @account.user_always_local_only? || @in_reply_to&.local_only end - def set_chat - if @in_reply_to.present? - unless @in_reply_to.chat_tags.blank? - @preloaded_tags |= @in_reply_to.chat_tags - @visibility = :chat - @in_reply_to = nil - end - elsif @tags.present? && @tags.any? { |t| t.start_with?('chat.', '.chat.') } - @visibility = :chat - @local_only = true if @tags.any? { |t| t.in?(%w(chat.local .chat.local)) || t.start_with?('chat.local.', '.chat.local.') } - end - end - # move tags out of body so we can format them later def extract_tags @text.gsub!(/^##/, "\uf666") @@ -124,14 +110,10 @@ class PostStatusService < BaseService set_footer_from_i_am extract_tags - set_chat set_local_only - - unless @visibility == :chat - set_initial_visibility - limit_visibility_if_silenced - limit_visibility_to_reply - end + set_initial_visibility + limit_visibility_if_silenced + limit_visibility_to_reply @sensitive = (@account.user_defaults_to_sensitive? || @options[:spoiler_text].present?) if @sensitive.nil? @@ -166,6 +148,7 @@ class PostStatusService < BaseService process_hashtags_service.call(@status, @tags, @preloaded_tags) process_mentions_service.call(@status) + return true end |