Progress with DMs

Progress with DMs
This commit is contained in:
mgabdev
2020-12-03 17:13:11 -05:00
parent a129b3ce3b
commit 137a36b810
53 changed files with 539 additions and 182 deletions

View File

@@ -14,8 +14,6 @@
#
class AccountConversation < ApplicationRecord
after_commit :push_to_streaming_api
belongs_to :account
belongs_to :conversation
belongs_to :last_status, class_name: 'Status'
@@ -102,11 +100,6 @@ class AccountConversation < ApplicationRecord
self.last_status_id = status_ids.last
end
def push_to_streaming_api
return if destroyed? || !subscribed_to_timeline?
PushConversationWorker.perform_async(id)
end
def subscribed_to_timeline?
Redis.current.exists("subscribed:#{streaming_channel}")
end