1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-01 10:50:56 +00:00

Fix tokenization of cheers in chat messages. Also fix cached token invalidation when changing how chat lines should render.

This commit is contained in:
SirStendec 2017-12-01 15:33:06 -05:00
parent 691c09eb18
commit aef58f24af
2 changed files with 52 additions and 43 deletions

View file

@ -75,7 +75,7 @@ export default class ChatLine extends Module {
if ( ! msg.message && msg.messageParts )
detokenizeMessage(msg);
const tokens = msg.ffzTokens = msg.ffzTokens || t.chat.tokenizeMessage(msg, {login: this.props.currentUserLogin, display: this.props.currentUserDisplayName});
const tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, {login: this.props.currentUserLogin, display: this.props.currentUserDisplayName});
let cls = 'chat-line__message',
out = tokens.length ? [
@ -175,8 +175,13 @@ export default class ChatLine extends Module {
updateLines() {
for(const inst of this.ChatLine.instances)
for(const inst of this.ChatLine.instances) {
const msg = inst.props.message;
if ( msg )
msg.ffz_tokens = null;
inst.forceUpdate();
}
}
}