mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-21 04:25:27 -04:00
Fix restore();
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "revolt.js",
|
||||
"version": "4.0.0-alpha.3",
|
||||
"version": "4.0.0-alpha.4",
|
||||
"main": "dist/index.js",
|
||||
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
|
||||
"author": "Paul Makles <insrt.uk>",
|
||||
|
||||
@@ -94,6 +94,10 @@ export class Client extends EventEmitter {
|
||||
async restore(user_id?: string) {
|
||||
await this.users.restore(user => { return { ...user, online: false } });
|
||||
await this.channels.restore();
|
||||
this.users.set({
|
||||
_id: '00000000000000000000000000',
|
||||
username: 'revolt'
|
||||
});
|
||||
if (user_id) this.user = this.users.get(user_id);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
export * from './Client';
|
||||
export { Channel, User, Message } from './api/objects';
|
||||
|
||||
export const LIBRARY_VERSION = '4.0.0-alpha.3';
|
||||
export const LIBRARY_VERSION = '4.0.0-alpha.4';
|
||||
|
||||
export const defaultConfig = {
|
||||
apiURL: 'https://api.revolt.chat',
|
||||
|
||||
@@ -5,11 +5,6 @@ import { Client } from '..';
|
||||
export default class Users extends Collection<User> {
|
||||
constructor(client: Client) {
|
||||
super(client, 'users');
|
||||
|
||||
this.set({
|
||||
_id: '00000000000000000000000000',
|
||||
username: 'revolt'
|
||||
});
|
||||
}
|
||||
|
||||
async fetchMutable(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user