Merge pull request #89 from Fab1en/features/fabien/display-permission-denied

[fix] Display permission denied error messages
This commit is contained in:
Jonas Herzig 2020-04-14 23:48:52 +02:00 committed by GitHub
commit e008ef171f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -408,6 +408,14 @@ class GlobalBindings {
})
})
// Log permission denied error messages
client.on('denied', (type) => {
ui.log.push({
type: 'generic',
value: 'Permission denied : '+ type
})
})
// Set own user and root channel
this.thisUser(client.self.__ui)
this.root(client.root.__ui)

View file

@ -184,6 +184,7 @@ import 'subworkers'
id = { client: id }
registerEventProxy(id, client, 'error')
registerEventProxy(id, client, 'denied', it => [it])
registerEventProxy(id, client, 'newChannel', (it) => [setupChannel(id, it)])
registerEventProxy(id, client, 'newUser', (it) => [setupUser(id, it)])
registerEventProxy(id, client, 'message', (sender, message, users, channels, trees) => {