소스 검색

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') {