aboutsummaryrefslogtreecommitdiff
path: root/shardweb/assets
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-12 15:52:42 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-12 15:52:42 +0200
commit0d358f6f699a5ce04ffe1bccf4f375b5f321391c (patch)
treeb90a1093b3ac0cd1e7d3643abb34e87078b6072e /shardweb/assets
parent1e91dc596fd2f7fdd96b7fd2fc50724f93e46529 (diff)
downloadshard-0d358f6f699a5ce04ffe1bccf4f375b5f321391c.tar.gz
shard-0d358f6f699a5ce04ffe1bccf4f375b5f321391c.zip
Private chat interface
Diffstat (limited to 'shardweb/assets')
-rw-r--r--shardweb/assets/js/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/shardweb/assets/js/app.js b/shardweb/assets/js/app.js
index 53a0112..3adae5a 100644
--- a/shardweb/assets/js/app.js
+++ b/shardweb/assets/js/app.js
@@ -20,10 +20,10 @@ import "phoenix_html"
import socket from "./socket"
-var room_name = window.Gon.getAsset('chat_room');
-if (room_name != undefined)
+var chat_channel = window.Gon.getAsset('chat_channel');
+if (chat_channel != undefined)
{
- var channel = socket.channel('room:' + room_name, {}); // connect to chat "room"
+ var channel = socket.channel(chat_channel, {}); // connect to chat "room"
channel.on('shout', function (payload) { // listen to the 'shout' event
var li = document.createElement("li"); // creaet new list item DOM element