Fix data parameter of ServerConnection.join.
This was broken when we renamed status to data. Thanks to Sylvie Tissot.
This commit is contained in:
+4
-4
@@ -417,9 +417,9 @@ ServerConnection.prototype.connect = async function(url) {
|
|||||||
* @param {string} group - The name of the group to join.
|
* @param {string} group - The name of the group to join.
|
||||||
* @param {string} username - the username to join as.
|
* @param {string} username - the username to join as.
|
||||||
* @param {string} password - the password.
|
* @param {string} password - the password.
|
||||||
* @param {Object<string,any>} [status] - the initial status of the user.
|
* @param {Object<string,any>} [data] - the initial associated data.
|
||||||
*/
|
*/
|
||||||
ServerConnection.prototype.join = function(group, username, password, status) {
|
ServerConnection.prototype.join = function(group, username, password, data) {
|
||||||
let m = {
|
let m = {
|
||||||
type: 'join',
|
type: 'join',
|
||||||
kind: 'join',
|
kind: 'join',
|
||||||
@@ -427,8 +427,8 @@ ServerConnection.prototype.join = function(group, username, password, status) {
|
|||||||
username: username,
|
username: username,
|
||||||
password: password,
|
password: password,
|
||||||
};
|
};
|
||||||
if(status)
|
if(data)
|
||||||
m.status = status;
|
m.data = data;
|
||||||
this.send(m);
|
this.send(m);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user