comparison modules/mod_publish_message.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 0d3f18bb1d36
children addbf6bbfaa8
comparison
equal deleted inserted replaced
55:fd69d35cf2e6 56:99bd1d1ac071
44 if (!autocreate && affil != 'super-owner' && affil != 'owner' && affil != 'publisher' && affil != 'publish-only') 44 if (!autocreate && affil != 'super-owner' && affil != 'owner' && affil != 'publisher' && affil != 'publish-only')
45 return makeError(response, errors.forbidden.n); 45 return makeError(response, errors.forbidden.n);
46 46
47 if (!config.enabled('item-ids')) 47 if (!config.enabled('item-ids'))
48 return makeError(response, errors.itemid_required.n); 48 return makeError(response, errors.itemid_required.n);
49 var itemID = makeRandomId(); 49 var itemID = uuid();
50 50
51 var now = new Date(); 51 var now = new Date();
52 52
53 var item = xmpp.stanza('item', {xmlns: NS.PUBSUB, id: itemID}); 53 var item = xmpp.stanza('item', {xmlns: NS.PUBSUB, id: itemID});
54 item.c('entry', {xmlns: NS.ATOM}); 54 item.c('entry', {xmlns: NS.ATOM});