From b4ba3c70efbb9c63a1f77aee400bd56c56c26bc1 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 25 Jan 2021 15:52:52 -0500 Subject: [PATCH] Revert streaming removals 2c8b4f7fb, 574b45e04, 8313f4b11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Revert: - streaming removals 2c8b4f7fb, 574b45e04, 8313f4b11 --- app/javascript/gabsocial/containers/gabsocial.js | 6 +++--- app/models/custom_filter.rb | 2 +- app/services/fetch_link_card_service.rb | 6 +++--- app/services/notify_service.rb | 2 +- app/services/post_status_service.rb | 2 +- app/services/reblog_service.rb | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/javascript/gabsocial/containers/gabsocial.js b/app/javascript/gabsocial/containers/gabsocial.js index 5b9f9ea2..f6302a3b 100644 --- a/app/javascript/gabsocial/containers/gabsocial.js +++ b/app/javascript/gabsocial/containers/gabsocial.js @@ -109,9 +109,9 @@ export default class GabSocial extends React.PureComponent { componentDidMount() { if (!!me) { - // this.disconnect = store.dispatch(connectUserStream()) - // store.dispatch(connectStatusUpdateStream()) - // store.dispatch(connectChatMessagesStream(me)) + this.disconnect = store.dispatch(connectUserStream()) + store.dispatch(connectStatusUpdateStream()) + store.dispatch(connectChatMessagesStream(me)) } console.log('%cGab Social ', [ diff --git a/app/models/custom_filter.rb b/app/models/custom_filter.rb index 5ce5d0f8..342207a5 100644 --- a/app/models/custom_filter.rb +++ b/app/models/custom_filter.rb @@ -43,7 +43,7 @@ class CustomFilter < ApplicationRecord def remove_cache Rails.cache.delete("filters:#{account_id}") - # Redis.current.publish("timeline:#{account_id}", Oj.dump(event: :filters_changed)) + Redis.current.publish("timeline:#{account_id}", Oj.dump(event: :filters_changed)) end def context_must_be_valid diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 4358e8ee..3a3a8480 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -180,8 +180,8 @@ class FetchLinkCardService < BaseService end def send_status_update_payload(status) - # @payload = InlineRenderer.render(status, nil, :status) - # @payload = Oj.dump(event: :update, payload: @payload) - # Redis.current.publish("statuscard:#{status.account_id}", @payload) + @payload = InlineRenderer.render(status, nil, :status) + @payload = Oj.dump(event: :update, payload: @payload) + Redis.current.publish("statuscard:#{status.account_id}", @payload) end end diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index 93be7041..a2a1ef6a 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -92,7 +92,7 @@ class NotifyService < BaseService def push_notification! return if @notification.activity.nil? - # Redis.current.publish("timeline:#{@recipient.id}", Oj.dump(event: :notification, payload: InlineRenderer.render(@notification, @recipient, :notification))) + Redis.current.publish("timeline:#{@recipient.id}", Oj.dump(event: :notification, payload: InlineRenderer.render(@notification, @recipient, :notification))) send_push_notifications! end diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 1df1f5e7..c360c65d 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -118,7 +118,7 @@ class PostStatusService < BaseService def postprocess_status! LinkCrawlWorker.perform_async(@status.id) - # DistributionWorker.perform_async(@status.id) + DistributionWorker.perform_async(@status.id) ExpiringStatusWorker.perform_at(@status.expires_at, @status.id) if @status.expires_at && @account.is_pro PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll end diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb index f330af5d..0c1bef8c 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -28,7 +28,7 @@ class ReblogService < BaseService text = options[:status] || '' reblog = account.statuses.create!(reblog: reblogged_status, text: text, visibility: visibility) - # DistributionWorker.perform_async(reblog.id) + DistributionWorker.perform_async(reblog.id) create_notification(reblog) bump_potential_friendship(account, reblog)