{"action":"created","issue":{"url":"https://api.github.com/repos/SamSaffron/message_bus/issues/64","repository_url":"https://api.github.com/repos/SamSaffron/message_bus","labels_url":"https://api.github.com/repos/SamSaffron/message_bus/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/SamSaffron/message_bus/issues/64/comments","events_url":"https://api.github.com/repos/SamSaffron/message_bus/issues/64/events","html_url":"https://github.com/SamSaffron/message_bus/issues/64","id":126746831,"number":64,"title":"Where do user_ids and group_ids get set?","user":{"login":"jemminger","id":2272,"avatar_url":"https://avatars.githubusercontent.com/u/2272?v=3","gravatar_id":"","url":"https://api.github.com/users/jemminger","html_url":"https://github.com/jemminger","followers_url":"https://api.github.com/users/jemminger/followers","following_url":"https://api.github.com/users/jemminger/following{/other_user}","gists_url":"https://api.github.com/users/jemminger/gists{/gist_id}","starred_url":"https://api.github.com/users/jemminger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemminger/subscriptions","organizations_url":"https://api.github.com/users/jemminger/orgs","repos_url":"https://api.github.com/users/jemminger/repos","events_url":"https://api.github.com/users/jemminger/events{/privacy}","received_events_url":"https://api.github.com/users/jemminger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-14T20:59:38Z","updated_at":"2016-02-12T07:02:13Z","closed_at":null,"body":"(is there some better place to ask for help?  Stackoverflow only has 12 followers of the \"discourse\" tag)\r\n\r\nThe readme shows this example:\r\n\r\n```ruby\r\n# messages can be targetted at particular users or groups\r\nMessageBus.publish \"/channel\", \"hello\", user_ids: [1,2,3], group_ids: [4,5,6]\r\n```\r\n\r\nHowever it does not make it clear what specifically a \"user_id\" is or where it is set.  In my use case, I want to broadcast a message to a specific user.  Is the user_id the user's database ID, or something else?  \r\n\r\nI suspect it's just some arbitrary identifier that I can just set into the current session and retrieve via \r\n\r\n```ruby\r\n  MessageBus.user_id_lookup do |env|\r\n    # return the user id here\r\n  end\r\n```\r\n\r\nbut I cannot seem to find the right place to put the `user_id_lookup` call where the rails session actually exists yet.  All I get for `env[\"rack.session\"]` is `#<ActionDispatch::Request::Session:0x7fb788510dc8 not yet loaded>`\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/SamSaffron/message_bus/issues/comments/183205382","html_url":"https://github.com/SamSaffron/message_bus/issues/64#issuecomment-183205382","issue_url":"https://api.github.com/repos/SamSaffron/message_bus/issues/64","id":183205382,"user":{"login":"SamSaffron","id":5213,"avatar_url":"https://avatars.githubusercontent.com/u/5213?v=3","gravatar_id":"","url":"https://api.github.com/users/SamSaffron","html_url":"https://github.com/SamSaffron","followers_url":"https://api.github.com/users/SamSaffron/followers","following_url":"https://api.github.com/users/SamSaffron/following{/other_user}","gists_url":"https://api.github.com/users/SamSaffron/gists{/gist_id}","starred_url":"https://api.github.com/users/SamSaffron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamSaffron/subscriptions","organizations_url":"https://api.github.com/users/SamSaffron/orgs","repos_url":"https://api.github.com/users/SamSaffron/repos","events_url":"https://api.github.com/users/SamSaffron/events{/privacy}","received_events_url":"https://api.github.com/users/SamSaffron/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T07:02:13Z","updated_at":"2016-02-12T07:02:13Z","body":"> Does that help? \r\n\r\nyes it does :) we should get something to help cover this in the readme. "}}