mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-17 10:16:57 +00:00
Fix issues with logged out users for actions.
Look up the room login from the ID when rendering a chat line if we don't have the login already. Add color validation to the color picker component. If room is null, don't even try sending a message. Allow sending messages to any room and not just the current room. Swallow errors when processing colors and return null.
This commit is contained in:
parent
fdde05030f
commit
c548f15290
9 changed files with 188 additions and 128 deletions
|
@ -519,14 +519,14 @@ export default class ChatHook extends Module {
|
|||
const controller = this.ChatController.first,
|
||||
service = controller && controller.chatService;
|
||||
|
||||
if ( ! service )
|
||||
if ( ! service || ! room )
|
||||
return null;
|
||||
|
||||
if ( room.startsWith('#') )
|
||||
room = room.slice(1);
|
||||
|
||||
if ( room.toLowerCase() !== service.channelLogin.toLowerCase() )
|
||||
return null;
|
||||
return service.client.sendCommand(room, message);
|
||||
|
||||
service.sendMessage(message);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue