add user's roles to GM presentation

This commit is contained in:
41666 2019-03-21 03:19:53 -05:00
parent 998b1930b3
commit a4c15f2d78
2 changed files with 3 additions and 1 deletions

View file

@ -5,6 +5,7 @@ export type Category = {
hidden: boolean,
name: string,
roles: string[],
_roles?: any,
type: 'single' | 'multi' | string
}

View file

@ -94,7 +94,8 @@ class PresentationService extends Service {
id: server.id,
gm: {
nickname: gm.nickname || gm.user.username,
color: gm.displayHexColor
color: gm.displayHexColor,
roles: gm.roles.keyArray()
},
server: this.serverSlug(server),
roles: (incRoles) ? (await this.rolesByServer(server, sd)).map(r => ({ ...r, selected: gm.roles.has(r.id) })) : [],