mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-31 23:18:31 +00:00
4.0.0-rc6.3
* Fixed: Emotes in locally echoed chat messages. (Update code for parsing emotes in locally echoed chat messages to find emote data in the new location.) * Fixed: Automatic opting out from raids not working in pop-out chat.
This commit is contained in:
parent
badb3f296e
commit
30ec9749da
4 changed files with 23 additions and 17 deletions
|
@ -731,26 +731,24 @@ export default class ChatHook extends Module {
|
|||
|
||||
|
||||
cls.prototype.ffzGetEmotes = function() {
|
||||
const emote_sets = this.client && this.client.session && this.client.session.emoteSets;
|
||||
if ( this._ffz_cached_sets === emote_sets )
|
||||
const emote_map = this.client && this.client.session && this.client.session.emoteMap;
|
||||
if ( this._ffz_cached_map === emote_map )
|
||||
return this._ffz_cached_emotes;
|
||||
|
||||
this._ffz_cached_sets = emote_sets;
|
||||
this._ffz_cached_map = emote_map;
|
||||
const emotes = this._ffz_cached_emotes = {};
|
||||
|
||||
if ( emote_sets )
|
||||
for(const set of emote_sets)
|
||||
if ( set && set.emotes )
|
||||
for(const emote of set.emotes)
|
||||
if ( emote ) {
|
||||
const token = emote.token;
|
||||
if ( Array.isArray(REGEX_EMOTES[token]) ) {
|
||||
for(const tok of REGEX_EMOTES[token] )
|
||||
emotes[tok] = emote.id;
|
||||
if ( emote_map )
|
||||
for(const emote of Object.values(emote_map))
|
||||
if ( emote ) {
|
||||
const token = emote.token;
|
||||
if ( Array.isArray(REGEX_EMOTES[token]) ) {
|
||||
for(const tok of REGEX_EMOTES[token] )
|
||||
emotes[tok] = emote.id;
|
||||
|
||||
} else
|
||||
emotes[token] = emote.id;
|
||||
}
|
||||
} else
|
||||
emotes[token] = emote.id;
|
||||
}
|
||||
|
||||
return emotes;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue