diff plugins/roster.js @ 106:c06ec02217ee

many changes
author Sonny Piers <sonny@fastmail.net>
date Tue, 26 Jun 2012 12:02:14 +0200
parents 595be4a8584f
children 5cb4733c5189
line wrap: on
line diff
old mode 100644
new mode 100755
--- a/plugins/roster.js
+++ b/plugins/roster.js
@@ -51,11 +51,11 @@ Lightstring.plugins['roster'] = {
     }
   },
   methods: {
-    'get': function(aSuccess, aError) {
+    'get': function(aOnSuccess, aOnError) {
       this.send(Lightstring.stanzas.roster.get(), function(stanza) {
         var contacts = [];
 
-        var items = stanza.DOM.getElementsByTagName('item');
+        var items = stanza.el.getElementsByTagName('item');
 
         for (var i = 0; i < items.length; i++) {
           var item = items[i];
@@ -87,9 +87,9 @@ Lightstring.plugins['roster'] = {
           contacts: contacts
         };
 
-        if (aSuccess)
-          aSuccess(stanza);
-      }, aError);
+        if (aOnSuccess)
+          aOnSuccess(stanza);
+      }, aOnError);
     }
   }
 };