pusher / pusher-http-ruby

Ruby library for Pusher Channels HTTP API
https://pusher.com/channels
MIT License
664 stars 124 forks source link

Pusher::Webhook#event for presence channel missing `user_info` #184

Closed ber8749 closed 1 year ago

ber8749 commented 1 year ago

The documentation for presence channels shows that user_info can be passed into the Pusher#authentication function. I would expect that the corresponding member_added or member_removed webhook event would contain that same user_info, but in my testing so far that has not been the case. Instead, the presence events look something like this:

{
  "channel"=>"presence-channel_name", 
  "name"=>"member_added", 
  "user_id"=>"100"
}

Am I missing something, or has this information been stripped from the event for some reason?

benw-pusher commented 1 year ago

Hi, we don't include the user info details in the webhook payload - as the user_info is generated and owned by your systems we only provide the user_id. With this you can then conduct any lookups or enrichment of the event with the info you hold about the user. This also keeps the payload size to a minimum. At this time we don't have any plans to add user_info to the presence event webhooks.