فهرست منبع

MUC: warn instead of error when we're no longer connected

JC Brand 4 سال پیش
والد
کامیت
5341a1ea49
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      src/headless/converse-muc.js

+ 4 - 4
src/headless/converse-muc.js

@@ -1814,18 +1814,18 @@ converse.plugins.add('converse-muc', {
              * @returns {Promise<boolean>}
              * @returns {Promise<boolean>}
              */
              */
             async isJoined () {
             async isJoined () {
+                const jid = this.get('jid');
                 const ping = $iq({
                 const ping = $iq({
-                    'to': `${this.get('jid')}/${this.get('nick')}`,
+                    'to': `${jid}/${this.get('nick')}`,
                     'type': "get"
                     'type': "get"
                 }).c("ping", {'xmlns': Strophe.NS.PING});
                 }).c("ping", {'xmlns': Strophe.NS.PING});
                 try {
                 try {
                     await api.sendIQ(ping);
                     await api.sendIQ(ping);
                 } catch (e) {
                 } catch (e) {
                     if (e === null) {
                     if (e === null) {
-                        log.error(`Timeout error while checking whether we're joined to MUC: ${this.get('jid')}`);
+                        log.warn(`isJoined: Timeout error while checking whether we're joined to MUC: ${jid}`);
                     } else {
                     } else {
-                        log.error(`Apparently we're no longer connected to MUC: ${this.get('jid')}`);
-                        log.error(e);
+                        log.warn(`isJoined: Apparently we're no longer connected to MUC: ${jid}`);
                     }
                     }
                     return false;
                     return false;
                 }
                 }