Fix send message and ban message

This commit is contained in:
Gregoire Parant
2021-01-17 03:07:46 +01:00
parent 74d0594246
commit 0bbaef0cb5
6 changed files with 101 additions and 79 deletions
+2 -2
View File
@@ -76,8 +76,8 @@ class JWTTokenManager {
}
private verifyBanUser(userUuid: string, ipAddress: string, room: string): Promise<AdminBannedData> {
room = room.split('/').join('_');
return adminApi.verifyBanUser(userUuid, ipAddress, room).then((data: AdminBannedData) => {
const world = room.split('/')[1]; //check by world
return adminApi.verifyBanUser(userUuid, ipAddress, world).then((data: AdminBannedData) => {
if (data && data.is_banned) {
throw new Error('User was banned');
}