Переглянути джерело

Fixes (#1118) sendBeacon when bosh url is set as https://.

master
damencho 5 роки тому
джерело
коміт
38ccf707e2
1 змінених файлів з 1 додано та 1 видалено
  1. 1
    1
      modules/xmpp/XmppConnection.js

+ 1
- 1
modules/xmpp/XmppConnection.js Переглянути файл

@@ -414,7 +414,7 @@ export default class XmppConnection extends Listenable {
414 414
         body.cnode(pres.tree());
415 415
 
416 416
         const res = navigator.sendBeacon(
417
-            `https:${this.service}`,
417
+            this.service.indexOf('https://') === -1 ? `https:${this.service}` : this.service,
418 418
             Strophe.serialize(body.tree()));
419 419
 
420 420
         logger.info(`Successfully send unavailable beacon ${res}`);

Завантаження…
Відмінити
Зберегти