Mercurial > psgxs
changeset 16:95fc43d1bd54
Don’t regenerate a subid if there is already one.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Tue, 19 Oct 2010 18:45:07 +0200 |
| parents | 60c80751cfa5 |
| children | ec7cea92fe8a |
| files | nodes.js |
| diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/nodes.js Tue Oct 19 17:48:45 2010 +0200 +++ b/nodes.js Tue Oct 19 18:45:07 2010 +0200 @@ -88,8 +88,12 @@ return errors.success; } - if (!subid) - subid = makeRandomId(); + if (!subid) { + if (this.subscribers[jid]) + subid = this.subscribers[jid].subid; + else + subid = makeRandomId(); + } this.subscribers[jid] = { type: type,
