mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-21 04:25:27 -04:00
Forgot to return 😐; don't fetch user anyways when getting from cache.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "revolt.js",
|
||||
"version": "5.0.1-alpha.4",
|
||||
"version": "5.0.1-alpha.5",
|
||||
"main": "dist/index.js",
|
||||
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
|
||||
"author": "Paul Makles <insrt.uk>",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
export * from './Client';
|
||||
export { UserPermission, ChannelPermission, ServerPermission } from './api/permissions';
|
||||
|
||||
export const LIBRARY_VERSION = '5.0.1-alpha.4';
|
||||
export const LIBRARY_VERSION = '5.0.1-alpha.5';
|
||||
|
||||
export const defaultConfig = {
|
||||
apiURL: 'https://api.revolt.chat',
|
||||
|
||||
+1
-1
@@ -203,7 +203,7 @@ export default class Users extends Collection<string, User> {
|
||||
* @returns User
|
||||
*/
|
||||
async fetch(id: string, data?: UserI) {
|
||||
if (this.has(id)) this.$get(id, data);
|
||||
if (this.has(id)) return this.$get(id, data);
|
||||
let res = data ?? await this.client.req('GET', `/users/${id}` as '/users/id');
|
||||
return this.createObj(res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user