Mercurial > psgxs
comparison nodes.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 | 023f767662d3 |
children |
comparison
equal
deleted
inserted
replaced
55:fd69d35cf2e6 | 56:99bd1d1ac071 |
---|---|
22 require('./iso8601'); | 22 require('./iso8601'); |
23 var errors = require('./errors'); | 23 var errors = require('./errors'); |
24 var config = require('./configuration'); | 24 var config = require('./configuration'); |
25 var service_configuration = config.service_configuration; | 25 var service_configuration = config.service_configuration; |
26 var Configuration = config.Configuration; | 26 var Configuration = config.Configuration; |
27 var makeRandomId = require('./fdsq').makeRandomId; | 27 var uuid = require('uuid'); |
28 | 28 |
29 exports.Item = function() { | 29 exports.Item = function() { |
30 this.content = null; | 30 this.content = null; |
31 this.date = new Date(); | 31 this.date = new Date(); |
32 return this; | 32 return this; |
92 | 92 |
93 if (!subid) { | 93 if (!subid) { |
94 if (this.subscribers[jid]) | 94 if (this.subscribers[jid]) |
95 subid = this.subscribers[jid].subid; | 95 subid = this.subscribers[jid].subid; |
96 else | 96 else |
97 subid = makeRandomId(); | 97 subid = uuid(); |
98 } | 98 } |
99 | 99 |
100 this.subscribers[jid] = { | 100 this.subscribers[jid] = { |
101 type: type, | 101 type: type, |
102 subid: subid, | 102 subid: subid, |