1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-08 23:30:53 +00:00

More bugfixes. Actually implement the API test experiment.

This commit is contained in:
SirStendec 2018-04-12 02:29:43 -04:00
parent 99f9974dea
commit 1b2ff27530
10 changed files with 57 additions and 13 deletions

View file

@ -6,7 +6,7 @@
import User from './user';
import {API_SERVER, WEBKIT_CSS as WEBKIT} from 'utilities/constants';
import {NEW_API, API_SERVER, WEBKIT_CSS as WEBKIT} from 'utilities/constants';
import {ManagedStyle} from 'utilities/dom';
import {has, SourcedSet} from 'utilities/object';
@ -175,6 +175,11 @@ export default class Room {
if ( this.destroyed )
return;
if ( this.manager.experiments.getAssignment('api_load') )
try {
fetch(`${NEW_API}/v1/rooms/${this.id ? `id/${this.id}` : this.login}`).catch(() => {});
} catch(err) { /* do nothing */ }
let response, data;
try {
response = await fetch(`${API_SERVER}/v1/room/${this.id ? `id/${this.id}` : this.login}`);