Skip to content

Commit

Permalink
feat: support new members data
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaaz committed Mar 24, 2024
1 parent 914d04b commit dea9871
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/services/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export class UsersService {
const members = await this.#profile.get(PROFILE.COMMUNITIES._.MEMBERS.resolve(community.id), context);

if (members.ok && members.data) {
community.members = Math.max(...Object.values(members.data) as number[] );
// remove total number because we only want platform members
delete members.data.total;

const platformMembers = Object.values(members.data);
community.members = Math.max(...platformMembers as number[] );
}
}

Expand Down

0 comments on commit dea9871

Please sign in to comment.