diff --git a/src/main.js b/src/main.js index d6407228..ac35dadf 100644 --- a/src/main.js +++ b/src/main.js @@ -149,7 +149,7 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}` FrankerFaceZ.Logger = Logger; const VER = FrankerFaceZ.version_info = { - major: 4, minor: 0, revision: 0, extra: '-rc20.1', + major: 4, minor: 0, revision: 0, extra: '-rc20.2', commit: __git_commit__, build: __webpack_hash__, toString: () => diff --git a/src/modules/chat/actions/index.jsx b/src/modules/chat/actions/index.jsx index 4e454f15..719b9c59 100644 --- a/src/modules/chat/actions/index.jsx +++ b/src/modules/chat/actions/index.jsx @@ -434,6 +434,9 @@ export default class Actions extends Module { const current_level = this.getUserLevel(current_room, current_user), msg_level = this.getUserLevel(current_room, msg.user); + if ( current_level < 3 ) + mod_icons = false; + const chat = this.resolve('site.chat'); for(const data of this.parent.context.get('chat.actions.inline')) { diff --git a/src/modules/chat/badges.jsx b/src/modules/chat/badges.jsx index 79763b6a..f2f5860c 100644 --- a/src/modules/chat/badges.jsx +++ b/src/modules/chat/badges.jsx @@ -632,6 +632,12 @@ export default class Badges extends Module { const room = this.parent.getRoom(room_id, room_login, true); let b; + if ( (room && ! room.badges) || ! this.twitch_badges ) { + const chat = this.resolve('site.chat'); + if ( chat && chat.tryUpdateBadges ) + chat.tryUpdateBadges(); + } + if ( room ) { const versions = room.badges && room.badges[badge]; b = versions && versions[version]; diff --git a/src/sites/twitch-twilight/modules/chat/index.js b/src/sites/twitch-twilight/modules/chat/index.js index 9ac92a6e..8b79e57e 100644 --- a/src/sites/twitch-twilight/modules/chat/index.js +++ b/src/sites/twitch-twilight/modules/chat/index.js @@ -604,6 +604,14 @@ export default class ChatHook extends Module { } + tryUpdateBadges() { + this.log.debug('Trying to update badge data from the chat container.'); + const inst = this.ChatContainer.first; + if ( inst ) + this.containerUpdated(inst, inst.props); + } + + closeRoomPicker(inst) { // eslint-disable-line class-methods-use-this inst.closeRoomPicker(); }