mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 18:52:11 +00:00
added chatroom channel with room ids and notifications channel
This commit is contained in:
@@ -40,9 +40,14 @@ document.onreadystatechange = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// find chatroom
|
||||
const chatroomId = document.getElementById('chatroom-hook').dataset["chatroomId"]
|
||||
|
||||
const handleJoinSession = async () => {
|
||||
App.session = await App.cable.subscriptions.create("VideoSessionChannel", {
|
||||
App.session = await App.cable.subscriptions.create({
|
||||
channel: "ChatRoomsChannel",
|
||||
room: chatroomId
|
||||
}, {
|
||||
connected: () => {
|
||||
broadcastData({
|
||||
type: JOIN_ROOM,
|
||||
|
||||
Reference in New Issue
Block a user