member is_admin.

This commit is contained in:
Miroslav Šedivý 2020-11-08 22:50:18 +01:00
parent 3c09eaf0ad
commit 6177ffc242
2 changed files with 5 additions and 1 deletions

View File

@ -95,7 +95,7 @@
<th>member.name</th>
<td>{{ neko.state.member.name }}</td>
</tr>
<tr>
<tr class="ok">
<th>member.is_admin</th>
<td>{{ neko.state.member.is_admin }}</td>
</tr>

View File

@ -81,6 +81,10 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
console.log('EVENT.MEMBER.CONNECTED')
this.emit('member.connected', member.id)
//user.addMember(member)
if (member.id === this.state.member.id) {
Vue.set(this.state.member, 'is_admin', member.admin)
}
}
protected [EVENT.MEMBER.DISCONNECTED]({ id }: MemberDisconnectPayload) {