comparison modules/mod_publish.js @ 56:99bd1d1ac071

Migration to node-xmpp, done!
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 10 Aug 2011 15:11:22 -0700
parents c979c4d0932b
children b98e545a94f7
comparison
equal deleted inserted replaced
55:fd69d35cf2e6 56:99bd1d1ac071
49 49
50 var item = request.getChild('item'); 50 var item = request.getChild('item');
51 var itemID = item.getAttribute('id'); 51 var itemID = item.getAttribute('id');
52 if (!config.enabled('item-ids') && itemID) 52 if (!config.enabled('item-ids') && itemID)
53 return makeError(response, errors.itemid_required.n); 53 return makeError(response, errors.itemid_required.n);
54 itemID = itemID? itemID: makeRandomId(); 54 itemID = itemID? itemID: uuid();
55 55
56 if (item.tags.length != 1) 56 if (item.tags.length != 1)
57 return makeError(response, errors.pub.publish.bad_payload.n); 57 return makeError(response, errors.pub.publish.bad_payload.n);
58 58
59 var conf = storage.getConfiguration(nodeID); 59 var conf = storage.getConfiguration(nodeID);