added chatroom channel with room ids and notifications channel

This commit is contained in:
Beatrice Olivera
2018-08-30 03:00:09 +01:00
parent f0bca74f89
commit 405d2cd5df
17 changed files with 699 additions and 25 deletions

View File

@@ -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,