pubnub / haskell

PubNub Haskell SDK
Other
19 stars 16 forks source link

Subscribing to multiple channels doesn't appear to produce any output #4

Open copumpkin opened 10 years ago

copumpkin commented 10 years ago

Are they expected to work yet? I tried adding multiple channels to my subscription and it doesn't seem to give me any output. Just subscribing to one at a time works fine.

tsloughter commented 10 years ago

Ah, I see the issue, if you are subscribe to multiple channels it return: [[a], Timestamp, Channelname]

Will have to do a few changes to make that work well, like will need to also always pass the channel name of the received message to the onMsg function.

copumpkin commented 10 years ago

Is it even worth supporting that directly, instead of just issuing separate calls to subscribe with different handlers? I just figured that since it took a list it was directly supported, but I don't see much benefit in complicating the callback mechanism when we can just include that information in the closure passed by the user.