From 199b9c931572af3ada74f11a38103b7ac7ff294c Mon Sep 17 00:00:00 2001 From: SirStendec Date: Thu, 13 Dec 2018 15:57:28 -0500 Subject: [PATCH] 4.0.0-rc13.16.1 * Changed: Increase the timeout length significantly for rich embeds because the link service can be a bit slow, depending on what it's looking up. --- src/main.js | 2 +- src/modules/chat/rich_providers.js | 1 + src/sites/twitch-twilight/modules/chat/rich_content.jsx | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index 3831522c..d735f2d4 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: '-rc13.16', + major: 4, minor: 0, revision: 0, extra: '-rc13.16.1', commit: __git_commit__, build: __webpack_hash__, toString: () => diff --git a/src/modules/chat/rich_providers.js b/src/modules/chat/rich_providers.js index 6f8072eb..150b9fdf 100644 --- a/src/modules/chat/rich_providers.js +++ b/src/modules/chat/rich_providers.js @@ -31,6 +31,7 @@ export const Links = { return { card_tooltip: true, url: token.url, + timeout: 0, getData: async () => { const data = await this.get_link_info(token.url); diff --git a/src/sites/twitch-twilight/modules/chat/rich_content.jsx b/src/sites/twitch-twilight/modules/chat/rich_content.jsx index a1b60ae0..3c49507d 100644 --- a/src/sites/twitch-twilight/modules/chat/rich_content.jsx +++ b/src/sites/twitch-twilight/modules/chat/rich_content.jsx @@ -5,7 +5,7 @@ // ============================================================================ import Module from 'utilities/module'; -import {timeout} from 'utilities/object'; +import {timeout, has} from 'utilities/object'; const ERROR_IMAGE = 'https://static-cdn.jtvnw.net/emoticons/v1/58765/2.0'; @@ -41,7 +41,7 @@ export default class RichContent extends Module { try { let data = this.props.getData(); if ( data instanceof Promise ) { - const to_wait = this.props.timeout || 1000; + const to_wait = has(this.props, 'timeout') ? this.props.timeout : 1000; if ( to_wait ) data = await timeout(data, to_wait); else