Split handshake into login/join.
For now, join must follow login, but it will make it easier to extend the protocol for joining multiple groups (think federation).
This commit is contained in:
+5
-2
@@ -612,12 +612,15 @@ function serverConnect() {
|
||||
let up = getUserPass();
|
||||
try {
|
||||
send({
|
||||
type: 'handshake',
|
||||
type: 'login',
|
||||
id: myid,
|
||||
group: group,
|
||||
username: up.username,
|
||||
password: up.password,
|
||||
})
|
||||
send({
|
||||
type: 'join',
|
||||
group: group,
|
||||
})
|
||||
sendRequest(document.getElementById('requestselect').value);
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
|
||||
Reference in New Issue
Block a user