diff --git a/src/lib/models/User.ts b/src/lib/models/User.ts index dd4dfcf..1710d06 100644 --- a/src/lib/models/User.ts +++ b/src/lib/models/User.ts @@ -291,14 +291,16 @@ export class User extends Model { public async friends({first, offset}: { first: number, offset: number }): Promise { const limit = first ?? 10; offset = offset ?? 0; - return await this.$get("rFriendOf", {limit, offset}) as User[]; + const friendList = await this.$get("rFriendOf", {limit, offset}) as User[]; + friendList.concat(await this.$get("rFriends", {limit, offset}) as User[]); + return friendList.slice(0, limit); } /** * The total number of the users friends. */ public async friendCount(): Promise { - return this.$count("rFriends"); + return await this.$count("rFriends") + await this.$count("rFriendOf"); } /**