Log out properly.

This commit is contained in:
Paul
2021-02-27 14:50:28 +00:00
parent c0c0be44eb
commit f4ecd615c6
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "revolt.js",
"version": "4.0.0-alpha.6",
"version": "4.0.0-alpha.7",
"main": "dist/index.js",
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
"author": "Paul Makles <insrt.uk>",
+2 -1
View File
@@ -211,8 +211,9 @@ export class Client extends EventEmitter {
* Utility functions.
*/
async logout() {
this.reset();
this.websocket.disconnect();
await this.req('GET', '/auth/logout');
this.reset();
}
reset() {
+1 -1
View File
@@ -1,7 +1,7 @@
export * from './Client';
export { Channel, User, Message } from './api/objects';
export const LIBRARY_VERSION = '4.0.0-alpha.6';
export const LIBRARY_VERSION = '4.0.0-alpha.7';
export const defaultConfig = {
apiURL: 'https://api.revolt.chat',