Revert "DEV: rework the chat-live-pane (#20511)" (#20514)

This reverts commit 10e1831139.
This commit is contained in:
Joffrey JAFFEUX
2023-03-02 20:20:39 +01:00
committed by GitHub
parent 10e1831139
commit 435761ef58
119 changed files with 2327 additions and 2632 deletions

View File

@@ -12,7 +12,7 @@ module ChatPublisher
{ scope: anonymous_guardian, root: :chat_message },
).as_json
content[:type] = :sent
content[:staged_id] = staged_id
content[:stagedId] = staged_id
permissions = permissions(chat_channel)
MessageBus.publish("/chat/#{chat_channel.id}", content.as_json, permissions)
@@ -133,13 +133,9 @@ module ChatPublisher
end
def self.publish_user_tracking_state(user, chat_channel_id, chat_message_id)
data = { chat_channel_id: chat_channel_id, chat_message_id: chat_message_id }.merge(
ChatChannelUnreadsQuery.call(channel_id: chat_channel_id, user_id: user.id),
)
MessageBus.publish(
self.user_tracking_state_message_bus_channel(user.id),
data.as_json,
{ chat_channel_id: chat_channel_id, chat_message_id: chat_message_id.to_i }.as_json,
user_ids: [user.id],
)
end