1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 01:56:55 +00:00
* Changed: Show the verified badge on rich chat embeds for Twitch partner channels.
* API Added: More flexible support for tokens when building chat embeds.
* API Added: Experiment for using the API to look-up links, rather than the socket cluster.
This commit is contained in:
SirStendec 2020-07-26 21:26:42 -04:00
parent a4fa1d1491
commit 05e8428a4a
7 changed files with 96 additions and 12 deletions

View file

@ -1536,10 +1536,15 @@ export default class Chat extends Module {
cbs[success ? 0 : 1](data);
}
if ( this.experiments.getAssignment('api_links') )
timeout(fetch(`https://api-test.frankerfacez.com/v2/link?url=${encodeURIComponent(url)}`).then(r => r.json()), 15000)
.then(data => handle(true, data))
.catch(err => handle(false, err));
timeout(this.socket.call('get_link', url), 15000)
.then(data => handle(true, data))
.catch(err => handle(false, err));
else
timeout(this.socket.call('get_link', url), 15000)
.then(data => handle(true, data))
.catch(err => handle(false, err));
});
}
}