mozilla-services/pushgo — pull request #80 by kitcambridge (2014-09-05 21:30:04+00:00)
Title: Fix a `forceReset` regression

As of #65, `{Emcee, No}Store.Exists()` correctly returns `false` if a device ID has not previously registered with the push server. This was not accompanied by a change to `Worker.Hello()`, causing all client-specified IDs to be ignored.

The client will now be assigned a new ID if...

* An explicit ID is not specified (i.e., the `"uaid"` field is `""` or omitted entirely), **or**...
* A client with the specified `uaid` is already connected, **or**...
* The number of channels in the opening handshake exceeds the number of subscriptions allowed by the backing store, **or**...
* The ID does not exist, **and** the client provides a list of `channelIDs`.