From 14ca47651b493d1cfbaea883564b578c2e645138 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 5 Feb 2022 13:45:32 +0100 Subject: [PATCH] Fix data parameter of ServerConnection.join. This was broken when we renamed status to data. Thanks to Sylvie Tissot. --- static/protocol.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/protocol.js b/static/protocol.js index e8d65f2..77436a1 100644 --- a/static/protocol.js +++ b/static/protocol.js @@ -417,9 +417,9 @@ ServerConnection.prototype.connect = async function(url) { * @param {string} group - The name of the group to join. * @param {string} username - the username to join as. * @param {string} password - the password. - * @param {Object} [status] - the initial status of the user. + * @param {Object} [data] - the initial associated data. */ -ServerConnection.prototype.join = function(group, username, password, status) { +ServerConnection.prototype.join = function(group, username, password, data) { let m = { type: 'join', kind: 'join', @@ -427,8 +427,8 @@ ServerConnection.prototype.join = function(group, username, password, status) { username: username, password: password, }; - if(status) - m.status = status; + if(data) + m.data = data; this.send(m); };