diff --git a/src/mami.js/ui/messages.jsx b/src/mami.js/ui/messages.jsx index d4df9fc..7eec208 100644 --- a/src/mami.js/ui/messages.jsx +++ b/src/mami.js/ui/messages.jsx @@ -191,7 +191,6 @@ Umi.UI.Messages = (function() { bType = msg.type.substring(7); bIsError = msg.detail.error; bArgs = msg.detail.args; - msgAuthor = Umi.Users.FindExact(bArgs[0]) ?? Umi.Users.FindExact('~' + bArgs[0]); } soundName = bIsError ? 'error' : 'server'; diff --git a/src/mami.js/users.js b/src/mami.js/users.js index 4ba7651..703515e 100644 --- a/src/mami.js/users.js +++ b/src/mami.js/users.js @@ -182,6 +182,9 @@ Umi.Users = (function() { return found; }, FindExact: function(userName) { + if(typeof userName !== 'string') + return null; + userName = userName.toLowerCase(); for(const user of users.values())