1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

Add getEmotes method to chat.emotes. Remove emoji mentions from chat.emotes because that'll have its own module as chat.emoji. Fix bug with Room objects changing their login if FFZ's server has outdated name info. Use getEmotes in emote tokenization. Move channel bar Apollo modifiers into the channel bar module. Rename CHAT_TYPES variable to use proper casing. Add touchmove handler to scroller for people with touchscreens. Fix spacing under the player in theatre mode with whispers disabled. Add navigate method to FineRouter.

This commit is contained in:
SirStendec 2017-11-22 15:39:38 -05:00
parent b51306019a
commit b04cd8a61a
12 changed files with 80 additions and 53 deletions

View file

@ -86,7 +86,6 @@ export default class Emotes extends Module {
}
this.loadGlobalSets();
this.loadEmojiData();
this.loadTwitchInventory();
}
@ -110,6 +109,17 @@ export default class Emotes extends Module {
.map(set_id => this.emote_sets[set_id]);
}
getEmotes(user_id, user_login, room_id, room_login) {
const emotes = {};
for(const emote_set of this.getSets(user_id, user_login, room_id, room_login))
if ( emote_set && emote_set.emotes )
for(const emote of Object.values(emote_set.emotes) )
if ( emote && ! has(emotes, emote.name) )
emotes[emote.name] = emote;
return emotes;
}
// ========================================================================
// FFZ Emote Sets
// ========================================================================
@ -267,15 +277,6 @@ export default class Emotes extends Module {
}
// ========================================================================
// Emoji
// ========================================================================
loadEmojiData() {
this.log.debug('Unimplemented: loadEmojiData');
}
// ========================================================================
// Twitch Data Lookup
// ========================================================================
@ -304,8 +305,6 @@ export default class Emotes extends Module {
return;
}
this.twitch_inventory_sets = data.emoticon_sets ? Object.keys(data.emoticon_sets) : [];
this.log.info('Twitch Inventory Sets:', this.twitch_inventory_sets);
}