mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-20 00:31:15 -08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user