tristandunn / pusher-fake

A fake Pusher server for development and testing.
https://rubygems.org/gems/pusher-fake
MIT License
173 stars 32 forks source link

make subscription_data match pusher 1.11 format #3

Closed twalpole closed 12 years ago

twalpole commented 12 years ago

I was having a problem with pusher-fake where the optional user_info parameter was not getting passed through properly on the subscription_succeeded event for presence channels. Looking at what was being sent it appears the subscription_data format was not correct for pusher 1.11.0 - It might have been correct for a previous version, not sure. I believe this patch updates it to match what pusher.js 1.11.0 expects

tristandunn commented 12 years ago

That's what I get for not having test coverage on it.

Thanks for the pull request. I cleaned it up a bit and removed the ids array from the presence hash since I don't see it being used in the Pusher JS and the feature still passes.

twalpole commented 12 years ago

You're welcome - I had included the ids array because its returned by the real pusher server - however as you stated it doesnt appear to actually get used in Pusher JS

tristandunn commented 12 years ago

Ah, interesting. I wonder if it's a legacy presence hash attribute. Perhaps someone at @pusher can clarify? Maybe @maryrosecook?

maryrosecook commented 12 years ago

Hiya. It was added to support an upcoming feature that ended up not being done. ids will probably be removed in a future protocol update.