play-co / hookbox

HookBox is a Comet server and message queue that tightly integrates with your existing web application via web hooks and a REST interface.
http://hookbox.org
MIT License
284 stars 23 forks source link

Method Addition - Publish via Subscription, JS API #48

Closed Xorlev closed 14 years ago

Xorlev commented 14 years ago

The addition of a publish method to the subscription object returned by the JS API should probably contain the publish method as described in the API docs. Leaving the conn.publish() method would be easy enough, however a method from within the subscription method which automatically substituted the channel name parameter and passed handling to the conn object would be simplistic and make more sense.

This way, arrays of subscription objects can be used and the publish method could be called on each rather than extracting the channel name from each in order to use the conn.publish() method.

mcarter commented 14 years ago

fixed in trunk