SHA256
Улучшить вложения и запись голосовых в личной переписке
This commit is contained in:
@@ -39,6 +39,10 @@ async function lookup(login, base) {
|
||||
method: 'GET', cache: 'no-store', credentials: 'omit', referrerPolicy: 'no-referrer',
|
||||
});
|
||||
if (!response.ok) throw new Error(`Access-server lookup HTTP ${response.status}`);
|
||||
const contentType = String(response.headers?.get?.('Content-Type') || '').toLowerCase();
|
||||
if (contentType && !contentType.includes('application/json')) {
|
||||
throw new Error('Access-server file directory returned a non-JSON response');
|
||||
}
|
||||
return normalizeServerResponse(await response.json());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user