瀏覽代碼

Provide more info in error message

JC Brand 5 年之前
父節點
當前提交
d58380af83
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/headless/converse-muc.js

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

@@ -269,7 +269,7 @@ converse.plugins.add('converse-muc', {
                 const chatbox = _.get(this, 'collection.chatbox');
                 if (!chatbox) {
                     return _converse.log(
-                        `Could not get collection.chatbox for message: ${this.get('id')}`,
+                        `Could not get collection.chatbox for message: ${JSON.stringify(this.toJSON())}`,
                         Strophe.LogLevel.ERROR
                     );
                 }
@@ -283,7 +283,7 @@ converse.plugins.add('converse-muc', {
                     const chatbox = _.get(this, 'collection.chatbox');
                     if (!chatbox) {
                         return _converse.log(
-                            `Could not get collection.chatbox for message: ${this.get('id')}`,
+                            `Could not get collection.chatbox for message: ${JSON.stringify(this.toJSON())}`,
                             Strophe.LogLevel.ERROR
                         );
                     }
@@ -296,7 +296,7 @@ converse.plugins.add('converse-muc', {
                 const chatbox = _.get(this, 'collection.chatbox');
                 if (!chatbox) {
                     return _converse.log(
-                        `Could not get collection.chatbox for message: ${this.get('id')}`,
+                        `Could not get collection.chatbox for message: ${JSON.stringify(this.toJSON())}`,
                         Strophe.LogLevel.ERROR
                     );
                 }