1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-11 00:20:54 +00:00
* Fixed: Case-sensitive blocked terms not functioning correctly.
* Fixed: Settings in the FFZ Control Center not reverting to a default appearance when reset.
* Fixed: Current Channel and Channel Color not being properly detected in the mod view, channel pages, and dashboard.
* Fixed: The channel points reward queue not functioning correctly.
* Changed: Allow highlighting and blocking by add-on badge, not just Twitch badge.
* Changed: Don't allocate `user.badges` and `user.emote_sets` until they're actually used to save on memory.
* Changed: Don't default the `Chat > Bits and Cheering >> Display animated cheers.` setting to the `Animated Emotes` setting.
* API Added: `badges.setBulk`, `badges.deleteBulk`, and `badges.extendBulk` for setting badges on users in bulk using an optimized data structure.
* API Added: Tokenizers can set `msg.ffz_halt_tokens = true` to prevent further tokenizers running. Useful when just discarding a message.
This commit is contained in:
SirStendec 2021-03-22 18:19:09 -04:00
parent a8b28b2d27
commit 1cdff0ec67
31 changed files with 533 additions and 1158 deletions

View file

@ -1238,7 +1238,7 @@ export default class ChatHook extends Module {
service.postMessageToCurrentChannel({}, msg);
}
event.preventDefault();
//event.preventDefault();
});
}
@ -1445,6 +1445,9 @@ export default class ChatHook extends Module {
if ( blocked_types.has(types[msg.type]) )
return;
if ( msg.type === types.ChannelPointsReward )
return;
if ( msg.type === types.RewardGift && ! t.chat.context.get('chat.bits.show-rewards') )
return;
@ -1470,6 +1473,8 @@ export default class ChatHook extends Module {
}
m.ffz_tokens = m.ffz_tokens || t.chat.tokenizeMessage(m, u, r);
if ( m.ffz_removed )
return;
const event = new FFZEvent({
message: m,
@ -2487,6 +2492,11 @@ export default class ChatHook extends Module {
// Chat Containers
// ========================================================================
get shouldUpdateChannel() {
const route = this.router.current_name;
return Twilight.POPOUT_ROUTES.includes(route) || Twilight.SUNLIGHT_ROUTES.includes(route);
}
containerMounted(cont, props) {
if ( ! props )
props = cont.props;
@ -2497,7 +2507,7 @@ export default class ChatHook extends Module {
this.updateRoomBitsConfig(cont, props.bitsConfig);
if ( props.data ) {
if ( Twilight.POPOUT_ROUTES.includes(this.router.current_name) ) {
if ( this.shouldUpdateChannel ){
const color = props.data.user?.primaryColorHex;
this.resolve('site.channel').updateChannelColor(color);
@ -2516,7 +2526,7 @@ export default class ChatHook extends Module {
containerUnmounted(cont) {
if ( Twilight.POPOUT_ROUTES.includes(this.router.current_name) ) {
if ( this.shouldUpdateChannel ) {
this.resolve('site.channel').updateChannelColor();
this.settings.updateContext({