1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 10:06:54 +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:
SirStendec 2018-07-18 17:06:14 -04:00
parent badb3f296e
commit 30ec9749da
4 changed files with 23 additions and 17 deletions

View file

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

View file

@ -7,6 +7,8 @@
import Module from 'utilities/module';
import { has } from 'utilities/object';
import Twilight from 'site';
export default class Channel extends Module {
constructor(...args) {
@ -49,7 +51,7 @@ export default class Channel extends Module {
this.RaidController = this.fine.define(
'raid-controller',
n => n.handleLeaveRaid && n.handleJoinRaid,
['user']
Twilight.CHAT_ROUTES
);
}

View file

@ -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;
}