comparison plugins/pubsub.js @ 87:0f6f213f0a33

Makes the PubSub items method to return the stanza object.
author Sonny Piers <sonny.piers@gmail.com>
date Tue, 21 Feb 2012 19:27:17 +0100
parents 0c10c9a69c69
children 55548845b177
comparison
equal deleted inserted replaced
86:0c10c9a69c69 87:0f6f213f0a33
85 var miniature = node.querySelector('link'); 85 var miniature = node.querySelector('link');
86 if (miniature) 86 if (miniature)
87 item.miniature = miniature.getAttribute('href'); 87 item.miniature = miniature.getAttribute('href');
88 items.push(item); 88 items.push(item);
89 }; 89 };
90 stanza.items = items;
90 91
91 if (aResult) 92 if (aResult)
92 aResult(items); 93 aResult(stanza);
93 }, aError); 94 }, aError);
94 }, 95 },
95 create: function(aTo, aNode, aFields, aResult, aError) { 96 create: function(aTo, aNode, aFields, aResult, aError) {
96 this.send(Lightstring.stanzas.pubsub.create(aTo, aNode, aFields), aResult, aError); 97 this.send(Lightstring.stanzas.pubsub.create(aTo, aNode, aFields), aResult, aError);
97 }, 98 },