Fix friend list display

pull/4/head
Trivernis 5 years ago
parent 3cd84078ea
commit 99c91f20a4

@ -291,8 +291,8 @@ export class User extends Model<User> {
public async friends({first, offset}: { first: number, offset: number }): Promise<User[]> { public async friends({first, offset}: { first: number, offset: number }): Promise<User[]> {
const limit = first ?? 10; const limit = first ?? 10;
offset = offset ?? 0; offset = offset ?? 0;
const friendList = await this.$get("rFriendOf", {limit, offset}) as User[]; let friendList = await this.$get("rFriendOf", {limit, offset}) as User[];
friendList.concat(await this.$get("rFriends", {limit, offset}) as User[]); friendList = friendList.concat(await this.$get("rFriends", {limit, offset}) as User[]);
return friendList.slice(0, limit); return friendList.slice(0, limit);
} }

Loading…
Cancel
Save