no need to be shy! shout all you want about errors.

This commit is contained in:
Holly Stubbs 2022-02-22 09:04:57 +00:00
parent 197dc1145e
commit 604e698f8e
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E

View file

@ -45,7 +45,10 @@ module.exports = class {
try { try {
delete this.avaliableStreams[streamName]; delete this.avaliableStreams[streamName];
this.avaliableStreamKeys = Object.keys(this.avaliableStreams); this.avaliableStreamKeys = Object.keys(this.avaliableStreams);
} catch (e) { consoleHelper.printError(`Was not able to remove stream [${streamName}]`) } } catch (e) {
consoleHelper.printError(`Was not able to remove stream [${streamName}]`);
console.error(e);
}
} }
addUserToStream(streamName, userToken) { addUserToStream(streamName, userToken) {
@ -91,7 +94,10 @@ module.exports = class {
// Remove user from stream's user list // Remove user from stream's user list
this.avaliableStreams[streamName].streamUsers.splice(userCurrentIndex, 1); this.avaliableStreams[streamName].streamUsers.splice(userCurrentIndex, 1);
consoleHelper.printBancho(`Removed user [${userToken}] from stream ${streamName}`); consoleHelper.printBancho(`Removed user [${userToken}] from stream ${streamName}`);
} catch (e) { consoleHelper.printBancho(`Can't Remove user [${userToken}] from stream ${streamName}`); } } catch (e) {
consoleHelper.printBancho(`Can't Remove user [${userToken}] from stream ${streamName}`);
console.error(e);
}
} }
sendToStream(streamName, streamData, initUser = null) { sendToStream(streamName, streamData, initUser = null) {