浏览代码

Bugfix.

Differentiate more clearly between presence type and the show element
JC Brand 12 年之前
父节点
当前提交
52bbe024cb
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      converse.js

+ 9 - 1
converse.js

@@ -1653,7 +1653,15 @@
         sendPresence: function (type) {
             var status_message = this.get('status_message'), 
                 presence;
-            if (type === 'unavailable') {
+            // Most of these presence types are actually not explicitly sent,
+            // but I add all of them here fore reference and future proofing.
+            if ((type === 'unavailable') ||
+                    (type === 'probe') ||
+                    (type === 'error') ||
+                    (type === 'unsubscribe') ||
+                    (type === 'unsubscribed') ||
+                    (type === 'subscribe') ||
+                    (type === 'subscribed')) {
                 presence = $pres({'type':type});
             } else {
                 if (type === 'online') {