mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-11 00:20:54 +00:00
4.31.6
* Fixed: Chat crashing due to Twitch's new introduction feature. This is currently done with a patch that converts such messages to the old style 'First Time Chat'. * Changed: The rich embed testing tool now supports automatic refresh when using a local development server.
This commit is contained in:
parent
dfb16c8483
commit
82878522db
4 changed files with 78 additions and 7 deletions
|
@ -1534,6 +1534,30 @@ export default class ChatHook extends Module {
|
|||
if ( msg.type === types.RewardGift && ! t.chat.context.get('chat.bits.show-rewards') )
|
||||
return;
|
||||
|
||||
if ( msg.type === types.CommunityIntroduction ) {
|
||||
// TODO: Make this better.
|
||||
msg = {
|
||||
type: types.Message,
|
||||
badgeDynamicData: {},
|
||||
badges: {},
|
||||
id: msg.id,
|
||||
isFirstMsg: true,
|
||||
message: msg.message,
|
||||
messageBody: msg.message,
|
||||
messageParts: [
|
||||
{type: 0, content: msg.message}
|
||||
],
|
||||
messageType: 0,
|
||||
channel: msg.channel,
|
||||
timestamp: new Date(),
|
||||
user: {
|
||||
userDisplayName: msg.displayName,
|
||||
userLogin: msg.login,
|
||||
userID: msg.userID
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if ( msg.type === types.Message ) {
|
||||
const m = t.chat.standardizeMessage(msg),
|
||||
cont = inst._ffz_connector ?? inst.ffzGetConnector();
|
||||
|
@ -2257,6 +2281,15 @@ export default class ChatHook extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
/*this.onCommunityIntroductionEvent = function(e) {
|
||||
try {
|
||||
|
||||
|
||||
} catch(err) {
|
||||
t.log.capture(err, {extra: e});
|
||||
}
|
||||
}*/
|
||||
|
||||
const old_anonsubgift = this.onAnonSubscriptionGiftEvent;
|
||||
this.onAnonSubscriptionGiftEvent = function(e) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue