Fix crash when a non-user (like a bot) send a message like the server
This commit is contained in:
parent
568451adae
commit
90b73796a5
|
@ -119,6 +119,7 @@ class GlobalBindings {
|
||||||
|
|
||||||
// Handle messages
|
// Handle messages
|
||||||
client.on('message', (sender, message, users, channels, trees) => {
|
client.on('message', (sender, message, users, channels, trees) => {
|
||||||
|
sender = sender || { __ui: 'Server' }
|
||||||
ui.log.push({
|
ui.log.push({
|
||||||
type: 'chat-message',
|
type: 'chat-message',
|
||||||
user: sender.__ui,
|
user: sender.__ui,
|
||||||
|
|
Loading…
Reference in a new issue