mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
4.20.84
* 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:
parent
a8b28b2d27
commit
1cdff0ec67
31 changed files with 533 additions and 1158 deletions
|
@ -506,9 +506,9 @@ export default class Emotes extends Module {
|
|||
room_user = room && room.getUser(user_id, user_login, true),
|
||||
user = this.parent.getUser(user_id, user_login, true);
|
||||
|
||||
return (user ? user.emote_sets._cache : []).concat(
|
||||
room_user ? room_user.emote_sets._cache : [],
|
||||
room ? room.emote_sets._cache : [],
|
||||
return (user?.emote_sets ? user.emote_sets._cache : []).concat(
|
||||
room_user?.emote_sets ? room_user.emote_sets._cache : [],
|
||||
room?.emote_sets ? room.emote_sets._cache : [],
|
||||
this.default_sets._cache
|
||||
);
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ export default class Emotes extends Module {
|
|||
}
|
||||
|
||||
_withSources(out, seen, emote_sets) { // eslint-disable-line class-methods-use-this
|
||||
if ( ! emote_sets._sources )
|
||||
if ( ! emote_sets?._sources )
|
||||
return;
|
||||
|
||||
for(const [provider, data] of emote_sets._sources)
|
||||
|
@ -560,8 +560,11 @@ export default class Emotes extends Module {
|
|||
if ( ! room )
|
||||
return [];
|
||||
|
||||
if ( ! room_user )
|
||||
return room.emote_sets._cache;
|
||||
if ( ! room_user?.emote_sets )
|
||||
return room.emote_sets ? room.emote_sets._cache : [];
|
||||
|
||||
else if ( ! room.emote_sets )
|
||||
return room_user.emote_sets._cache;
|
||||
|
||||
return room_user.emote_sets._cache.concat(room.emote_sets._cache);
|
||||
}
|
||||
|
@ -589,7 +592,7 @@ export default class Emotes extends Module {
|
|||
|
||||
getGlobalSetIDs(user_id, user_login) {
|
||||
const user = this.parent.getUser(user_id, user_login, true);
|
||||
if ( ! user )
|
||||
if ( ! user?.emote_sets )
|
||||
return this.default_sets._cache;
|
||||
|
||||
return user.emote_sets._cache.concat(this.default_sets._cache);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue