1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Fix data parameter of ServerConnection.join.

This was broken when we renamed status to data.  Thanks to
Sylvie Tissot.
This commit is contained in:
Juliusz Chroboczek 2022-02-05 13:45:32 +01:00
parent 5444aa9089
commit 14ca47651b

View file

@ -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<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 = {
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);
};