diff --git a/src/main.js b/src/main.js index 147221e9..059d9db1 100644 --- a/src/main.js +++ b/src/main.js @@ -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: () => diff --git a/src/sites/twitch-twilight/modules/channel.js b/src/sites/twitch-twilight/modules/channel.js index 158fea9a..70ac7fcc 100644 --- a/src/sites/twitch-twilight/modules/channel.js +++ b/src/sites/twitch-twilight/modules/channel.js @@ -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 ); } diff --git a/src/sites/twitch-twilight/modules/chat/index.js b/src/sites/twitch-twilight/modules/chat/index.js index 8891af7f..1f85fb81 100644 --- a/src/sites/twitch-twilight/modules/chat/index.js +++ b/src/sites/twitch-twilight/modules/chat/index.js @@ -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; } diff --git a/webpack.web.babel.js b/webpack.web.babel.js index f90c1b20..97793fcc 100644 --- a/webpack.web.babel.js +++ b/webpack.web.babel.js @@ -1,3 +1,4 @@ +const webpack = require('webpack'); const merge = require('webpack-merge'); const common = require('./webpack.web.common.js'); const path = require('path'); @@ -6,6 +7,8 @@ const CleanPlugin = require('clean-webpack-plugin'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const ManifestPlugin = require('webpack-manifest-plugin'); +const commit_hash = require('child_process').execSync('git rev-parse HEAD').toString().trim(); + /* global module __dirname */ const config = module.exports = merge(common, { @@ -39,6 +42,9 @@ const config = module.exports = merge(common, { } } }), + new webpack.DefinePlugin({ + __git_commit__: JSON.stringify(commit_hash) + }), new ManifestPlugin({ basePath: 'babel/', publicPath: 'babel/',