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:
Juliusz Chroboczek
2020-08-12 11:50:30 +02:00
parent 6bde5f986a
commit 7b51296262
3 changed files with 37 additions and 4 deletions
+5 -2
View File
@@ -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);