diff nothing.js @ 13:161d4ea1c3f8

Migration of the client-side to XMPP.js instead of Strophe.js. Drop BOSH support and add WebSockets support. The server-side is untested, may be broken.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 03 Nov 2011 14:23:10 -0700
parents 4d7a67349089
children 03be0717d3f8
line wrap: on
line diff
--- a/nothing.js
+++ b/nothing.js
@@ -1,11 +1,11 @@
 'use strict';
 
-parsers[''] = function(id, xml) {
+parsers[''] = function(item) {
 	var toDate = function() {
 		return new Date();
 	};
 
-	var toHTML = function(xml, date) {
+	var toHTML = function(item, date) {
 		var article = document.createElementNS(ns.xhtml, 'article');
 		article.setAttributeNS(ns.e, 'id', id);
 		article.setAttributeNS(ns.e, 'date', date.to8601());
@@ -13,7 +13,7 @@ parsers[''] = function(id, xml) {
 		return article;
 	};
 
-	this.xml = xml;
-	this.date = toDate(xml);
-	this.html = toHTML(xml, this.date);
+	this.xml = item.payload;
+	this.date = toDate();
+	this.html = toHTML(item, this.date);
 }