Fix crash when a non-user (like a bot) send a message like the server

This commit is contained in:
Michel Roux 2017-09-19 00:19:29 +02:00
parent 568451adae
commit 90b73796a5

View file

@ -119,6 +119,7 @@ class GlobalBindings {
// Handle messages
client.on('message', (sender, message, users, channels, trees) => {
sender = sender || { __ui: 'Server' }
ui.log.push({
type: 'chat-message',
user: sender.__ui,