1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-07 06:40:54 +00:00
* Added: Option for displaying larger embeds in chat for supported sources. This won't do anything until the link service is updated with support.
* Added: Support for v6 rich content for embeds, tool-tips, and the rich content debugger.
* Changed: Limit the width of rich content embeds in portrait mode.
* Fixed: Clicking badges not working correctly.
* Fixed: Rich embeds being rendered when an unsupported version is returned from the embed server.
* Fixed: The month being off by one in the default filename when saving a settings backup.
* Fixed: The Chat Identity entry not appearing in the chat settings menu when appropriate.
* API Added: `Mutex()` class for limiting something to a certain number of accessors at once.
This commit is contained in:
SirStendec 2021-11-15 17:12:01 -05:00
parent 97c96be276
commit e704677e84
14 changed files with 228 additions and 104 deletions

View file

@ -224,6 +224,16 @@ export default class Chat extends Module {
}
});
this.settings.add('chat.rich.want-mid', {
default: false,
ui: {
path: 'Chat > Appearance >> Rich Content',
title: 'Display larger rich content in chat.',
description: 'This enables the use of bigger rich content embeds in chat. This is **not** recommended for most users and/or chats.\n\n**Note:** Enabling this may cause chat to scroll at inopportune times due to content loading. Moderators should not use this feature.',
component: 'setting-check-box'
}
});
this.settings.add('chat.rich.hide-tokens', {
default: false,
ui: {
@ -1879,11 +1889,13 @@ export default class Chat extends Module {
const providers = this.__rich_providers;
const want_mid = this.context.get('chat.rich.want-mid');
for(const token of tokens) {
for(const provider of providers)
if ( provider.test.call(this, token, msg) ) {
token.hidden = provider.can_hide_token && (this.context.get('chat.rich.hide-tokens') || provider.hide_token);
return provider.process.call(this, token);
return provider.process.call(this, token, want_mid);
}
}
}