user_id missing all events except presence ones
Closed this issue ยท 6 comments
I've just switched to using Poxa as a local development server instead of Pusher. Everything works fine except for the fact that the payload passed to the web hook for client events doesn't contain user_id.
The payload the web hook receives for client events is:
{ "time_ms": 1547733701277, "events": [ { "user_id": "1685c1e0ca9048b8b7920253bd2112f2", "name": "member_added", "channel": "presence-conversation-events-proto@1685c1e0ca4047409b27ec75da28d03f" }, { "name": "channel_occupied", "channel": "presence-conversation-events-proto@1685c1e0ca4047409b27ec75da28d03f" }, { "user_id": "1685c1e0ca904117a70438c738372c03", "name": "member_added", "channel": "presence-conversation-events-proto@1685c1e0ca4047409b27ec75da28d03f" }, { "socket_id": "3417474228.2253642610", "name": "client_event", "event": "client-message", "data": "H4sIAAAAAAAAAzNSMDSzME02TDVITjEzMDE1Nk0ysDCxNDY1sUxLMjK3NE524k7OyUzNKzFUyC1OBwBML4zWLwAAAA==", "channel": "presence-conversation-events-proto@1685c1e0ca4047409b27ec75da28d03f" }, { "socket_id": "866520994.1440655151", "name": "client_event", "event": "client-message", "data": "H4sIAAAAAAAAAzNSMDSzME02TDVITjEzMDFPtLBMSbQ0T00zT0o0SUs1MzJy4k7OyUzNKzFSyC1OBwC9bgpJLwAAAA==", "channel": "presence-conversation-events-proto@1685c1e0ca4047409b27ec75da28d03f" } ] }
As you can see memeber_added
and member_removed
have the user_id
field but all the other events don't.
Yeah we should add them ๐
@edgurgel I don't have any elixir experience but if you give me some pointers I can try to make a PR to add user_id.
No problem, @alexandrugheorghe . I'm happy to at them!
Can you clarify if Pusher is adding user_id
to every event? It would be great to know which subset has the user_id
๐
hi @edgurgel , I am a coworker of Alexandru's also working closely with Pusher. Pusher adds user_id to all events on all private and presence channels. Please follow the same if you can. We appreciate the support! p.s. awesome library, thanks for maintaining it:)
Thanks for the info, @matetukacs.
I'm planning to do some Poxa work soon but I think it should be simple to "inject" user_id
for channel events that can include an user_id
๐
0.8.1 relesaed! ๐