mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-02 03:10:56 +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
|
@ -102,10 +102,16 @@ export default class ChatLine extends Module {
|
|||
const user = msg.user,
|
||||
color = t.parent.colors.process(user.color),
|
||||
bg_css = null, //Math.random() > .7 ? t.parent.inverse_colors.process(user.color) : null,
|
||||
room = msg.roomLogin ? msg.roomLogin : msg.channel ? msg.channel.slice(1) : undefined,
|
||||
|
||||
show = this._ffz_show = this.state.alwaysShowMessage || ! this.props.message.deleted;
|
||||
|
||||
let room = msg.roomLogin ? msg.roomLogin : msg.channel ? msg.channel.slice(1) : undefined;
|
||||
|
||||
if ( ! room && this.props.channelID ) {
|
||||
const r = t.chat.getRoom(this.props.channelID, null, true);
|
||||
if ( r && r.login )
|
||||
room = msg.roomLogin = r.login;
|
||||
}
|
||||
|
||||
if ( ! msg.message && msg.messageParts )
|
||||
detokenizeMessage(msg);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue