mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 18:06:55 +00:00
4.9.4
* Added: Room Actions can now be filtered based on the chat being in Followers-Only Mode or R9K Mode. * Changed: Custom tool-tips for actions now support variables. Time-out and ban reasons do as well. Text labels do not. * Fixed: Chat messages from Twitch Extensions not displaying.
This commit is contained in:
parent
d150b9720d
commit
6cb585d7d4
9 changed files with 154 additions and 9 deletions
|
@ -605,6 +605,21 @@ export default class ChatHook extends Module {
|
|||
if ( handler )
|
||||
handler.addMessageHandler(inst.handleMessage);
|
||||
|
||||
if ( Array.isArray(inst.buffer) ) {
|
||||
let i = inst.buffer.length;
|
||||
const ct = this.chat_types || CHAT_TYPES;
|
||||
|
||||
while(i--) {
|
||||
const msg = inst.buffer[i];
|
||||
if ( msg && msg.type === ct.RoomState && msg.state ) {
|
||||
this.chat.context.updateContext({
|
||||
chat_state: msg.state
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inst.props.setMessageBufferAPI({
|
||||
addUpdateHandler: inst.addUpdateHandler,
|
||||
removeUpdateHandler: inst.removeUpdateHandler,
|
||||
|
@ -1313,6 +1328,24 @@ export default class ChatHook extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const old_state = this.onRoomStateEvent;
|
||||
this.onRoomStateEvent = function(e) {
|
||||
try {
|
||||
const channel = e.channel,
|
||||
current = t.chat.context.get('context.channel');
|
||||
|
||||
if ( channel && (channel === current || channel === `#${current}`) )
|
||||
t.chat.context.updateContext({
|
||||
chat_state: e.state
|
||||
});
|
||||
|
||||
} catch(err) {
|
||||
t.log.capture(err, {extra: e});
|
||||
}
|
||||
|
||||
return old_state.call(i, e);
|
||||
}
|
||||
|
||||
const old_resub = this.onResubscriptionEvent;
|
||||
this.onResubscriptionEvent = function(e) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue