1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 10:38:30 +00:00

4.0.0-rc8.3

* Fixed: Users mentioning themselves in Chat on Videos and Clips Chat appearing to highlight the user.
* Fixed: Attempting to read Twitch experiment state from an uninitialized controller.
This commit is contained in:
SirStendec 2018-07-22 17:04:10 -04:00
parent 5ffeb71ba7
commit 2508a6c025
4 changed files with 24 additions and 5 deletions

View file

@ -177,10 +177,20 @@ export default class ExperimentManager extends Module {
const core = this.resolve('site').getCore(), const core = this.resolve('site').getCore(),
exps = core && core.experiments; exps = core && core.experiments;
if ( exps && exps.overrides[key] ) if ( ! exps )
return null;
if ( ! exps.hasInitialized && exps.initialize )
try {
exps.initialize();
} catch(err) {
this.log.warn('Error attempting to initialize Twitch experiments tracker.', err);
}
if ( exps.overrides && exps.overrides[key] )
return exps.overrides[key]; return exps.overrides[key];
else if ( exps && exps.assignments[key] ) else if ( exps.assignments && exps.assignments[key] )
return exps.assignments[key]; return exps.assignments[key];
return null; return null;

View file

@ -100,7 +100,7 @@ class FrankerFaceZ extends Module {
FrankerFaceZ.Logger = Logger; FrankerFaceZ.Logger = Logger;
const VER = FrankerFaceZ.version_info = { const VER = FrankerFaceZ.version_info = {
major: 4, minor: 0, revision: 0, extra: '-rc8.2', major: 4, minor: 0, revision: 0, extra: '-rc8.3',
commit: __git_commit__, commit: __git_commit__,
build: __webpack_hash__, build: __webpack_hash__,
toString: () => toString: () =>

View file

@ -48,7 +48,9 @@ export default class Line extends Module {
user = msg.user, user = msg.user,
color = t.parent.colors.process(user.color), color = t.parent.colors.process(user.color),
tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, user); u = t.site.getUser();
const tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, u);
return (<div class="tw-mg-b-1 tw-font-size-5 tw-c-text-alt clip-chat__message"> return (<div class="tw-mg-b-1 tw-font-size-5 tw-c-text-alt clip-chat__message">
<div class="tw-animation tw-animation--animate tw-animation--duration-short tw-animation--fill-mode-both tw-animation--slide-in-bottom tw-animation--timing-ease" data-room-id={msg.roomID} data-room={msg.roomLogin} data-user-id={user.id} data-user={user.login}> <div class="tw-animation tw-animation--animate tw-animation--duration-short tw-animation--fill-mode-both tw-animation--slide-in-bottom tw-animation--timing-ease" data-room-id={msg.roomID} data-room={msg.roomLogin} data-user-id={user.id} data-user={user.login}>

View file

@ -143,7 +143,14 @@ export default class VideoChatHook extends Module {
user = msg.user, user = msg.user,
color = t.site_chat.colors.process(user.color), color = t.site_chat.colors.process(user.color),
tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, user), u = t.site.getUser();
if ( u ) {
u.moderator = this.props.isCurrentUserModerator;
u.staff = u.roles && u.roles.isStaff;
}
const tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, u),
rich_content = FFZRichContent && t.chat.pluckRichContent(tokens, msg); rich_content = FFZRichContent && t.chat.pluckRichContent(tokens, msg);
return (<div class="tw-align-items-start tw-flex tw-flex-nowrap tw-c-text"> return (<div class="tw-align-items-start tw-flex tw-flex-nowrap tw-c-text">