joinpublicromm error msg fix
This commit is contained in:
parent
c22ca39e3b
commit
27bdd2e15b
1 changed files with 19 additions and 15 deletions
|
@ -316,6 +316,7 @@ export const joinPublicRoom: Act = {
|
||||||
return void aws("error", "existence");
|
return void aws("error", "existence");
|
||||||
}
|
}
|
||||||
if (await isRoomFull(roomID)) return void aws("error", "limit");
|
if (await isRoomFull(roomID)) return void aws("error", "limit");
|
||||||
|
try {
|
||||||
let queryx = await insert(
|
let queryx = await insert(
|
||||||
roomMembers.roomID,
|
roomMembers.roomID,
|
||||||
roomMembers.name,
|
roomMembers.name,
|
||||||
|
@ -330,7 +331,10 @@ export const joinPublicRoom: Act = {
|
||||||
if (queryx.affectedRows > 0) {
|
if (queryx.affectedRows > 0) {
|
||||||
aws("ok", "");
|
aws("ok", "");
|
||||||
} else {
|
} else {
|
||||||
aws("error", "server");
|
aws("error", "duplicate");
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
aws("error", "duplicate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue