Deleted use of WAError and add defining of language of client everywhere

This commit is contained in:
CEC
2022-04-13 17:42:44 +02:00
parent 13b0996c8b
commit 209dd43aac
6 changed files with 11 additions and 18 deletions
@@ -236,6 +236,8 @@ export class IoSocketController {
const websocketExtensions = req.getHeader("sec-websocket-extensions");
const IPAddress = req.getHeader("x-forwarded-for");
adminApi.setLocale(req.getHeader("accept-language"));
const roomId = query.roomId;
try {
if (typeof roomId !== "string") {
+2
View File
@@ -107,6 +107,8 @@ export class MapController extends BaseHttpController {
return;
}
adminApi.setLocale(req.header("accept-language"));
// If no admin URL is set, let's react on '/_/[instance]/[map url]' URLs
if (!ADMIN_API_URL) {
const roomUrl = new URL(query.playUri);
+1 -1
View File
@@ -29,7 +29,7 @@ export type FetchMemberDataByUuidResponse = z.infer<typeof isFetchMemberDataByUu
class AdminApi implements AdminInterface {
private locale: string = "en";
setLocale(locale: string) {
//console.info('PUSHER LOCALE SET TO :', locale);
console.info('PUSHER LOCALE SET TO :', locale);
this.locale = locale;
}
/**