Support Registration on Webatrice with a baseline of handling. (#4436)

* Support Registration on Webatrice with a baseline of handling. Still needs to support activation tokens & unit testing.

* Add support for account activation with token

* Activate Account refactor

* Fix typo

* Add Unit Testing for Commands/Events

* Changes based on review feedback
This commit is contained in:
Zach H
2021-10-20 22:07:35 -04:00
committed by GitHub
parent ebebb9c4bb
commit b1ef8220ee
14 changed files with 483 additions and 68 deletions

View File

@@ -1,10 +1,9 @@
import { ServerConnectParams } from "store";
import { ServerStatus, StatusEnum } from "types";
import {ServerStatus, StatusEnum} from "types";
import { ProtobufService } from './services/ProtobufService';
import { WebSocketService, WebSocketOptions } from "./services/WebSocketService";
import {ProtobufService} from './services/ProtobufService';
import {WebSocketOptions, WebSocketService} from "./services/WebSocketService";
import { RoomPersistence, SessionPersistence } from './persistence';
import {RoomPersistence, SessionPersistence} from './persistence';
export class WebClient {
public socket = new WebSocketService(this);
@@ -36,6 +35,8 @@ export class WebClient {
port: "",
user: "",
pass: "",
clientid: null,
reason: null,
autojoinrooms: true,
keepalive: 5000
};
@@ -52,8 +53,8 @@ export class WebClient {
console.log(this);
}
public connect(options: ServerConnectParams) {
this.options = { ...this.options, ...options };
public connect(options: WebSocketOptions) {
this.options = {...this.options, ...options};
this.socket.connect(this.options);
}