]> git.babelmonkeys.de Git - socialXMPP.git/commitdiff
Ignore own PEP events
authorFlorian Zeitz <florob@babelmonkeys.de>
Sun, 22 Mar 2009 02:49:37 +0000 (03:49 +0100)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sun, 22 Mar 2009 02:53:37 +0000 (03:53 +0100)
scripts/basic.js

index b7e597b53b9809f2b93b62ae544fe9218ef119f3..06ff778051d6701d4f2e4e1d78afdef3b1c73e77 100644 (file)
@@ -142,6 +142,9 @@ function genCaps() {
 
 function _cbPEP(e) {
     var from = e.getAttribute('from');
+    if (Strophe.getBareJidFromJid(from) == Strophe.getBareJidFromJid(connection.jid)) {
+       return true; // Drop own PEP events
+    }
     var items = e.getElementsByTagName('items')[0];
     // Handle Tune
     if (items.getAttribute('node') == NS_TUNE) {