[mirotalk] - fix typo

This commit is contained in:
Miroslav Pejic
2023-04-26 17:10:12 +02:00
parent c1b50c9e76
commit 61aaecf549
3 changed files with 12 additions and 14 deletions
+6 -12
View File
@@ -1129,15 +1129,12 @@ async function whoAreYou() {
getId('loadingDiv').style.display = 'none';
document.body.style.background = 'var(--body-bg)';
let userExist = false;
if (myPeerName) {
myPeerName = filterXSS(myPeerName);
console.log(`11.1 Check if ${myPeerName} exist in the room`, roomId);
userExist = await checkUserName();
if (userExist) {
if (await checkUserName()) {
return userNameAlreadyInRoom();
}
@@ -1184,9 +1181,7 @@ async function whoAreYou() {
}
// check if peer name is already in use in the room
userExist = await checkUserName();
if (userExist) {
if (await checkUserName()) {
return 'Username is already in use!';
} else {
window.localStorage.peer_name = myPeerName;
@@ -5880,8 +5875,7 @@ async function updateMyPeerName() {
if (!myPeerNameSet.value) return;
// check if peer name is already in use in the room
const userExist = await checkUserName(myPeerNameSet.value);
if (userExist) {
if (await checkUserName(myPeerNameSet.value)) {
myPeerNameSet.value = '';
return userLog('warning', 'Username is already in use!');
}
@@ -7421,13 +7415,13 @@ function handleFileInfo(config) {
'From: ' +
incomingFileInfo.peer_name +
'\n' +
' Incoming file: ' +
'Incoming file: ' +
incomingFileInfo.file.fileName +
'\n' +
' File size: ' +
'File size: ' +
bytesToSize(incomingFileInfo.file.fileSize) +
'\n' +
' File type: ' +
'File type: ' +
incomingFileInfo.file.fileType;
console.log(fileToReceiveInfo);
// generate chat avatar by peer_name
+4 -2
View File
@@ -1,4 +1,6 @@
let adjectives = [
'use strict';
const adjectives = [
'small',
'big',
'large',
@@ -52,7 +54,7 @@ let adjectives = [
'smart',
];
let nouns = [
const nouns = [
'dog',
'bat',
'wrench',
+2
View File
@@ -1,3 +1,5 @@
'use strict';
// https://github.com/mikecao/umami
const script = document.createElement('script');