{"action":"created","issue":{"url":"https://api.github.com/repos/slackhq/hubot-slack/issues/229","labels_url":"https://api.github.com/repos/slackhq/hubot-slack/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/slackhq/hubot-slack/issues/229/comments","events_url":"https://api.github.com/repos/slackhq/hubot-slack/issues/229/events","html_url":"https://github.com/slackhq/hubot-slack/pull/229","id":106056923,"number":229,"title":"Persist more user data from Slack in the brain","user":{"login":"technicalpickles","id":159,"avatar_url":"https://avatars.githubusercontent.com/u/159?v=3","gravatar_id":"","url":"https://api.github.com/users/technicalpickles","html_url":"https://github.com/technicalpickles","followers_url":"https://api.github.com/users/technicalpickles/followers","following_url":"https://api.github.com/users/technicalpickles/following{/other_user}","gists_url":"https://api.github.com/users/technicalpickles/gists{/gist_id}","starred_url":"https://api.github.com/users/technicalpickles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technicalpickles/subscriptions","organizations_url":"https://api.github.com/users/technicalpickles/orgs","repos_url":"https://api.github.com/users/technicalpickles/repos","events_url":"https://api.github.com/users/technicalpickles/events{/privacy}","received_events_url":"https://api.github.com/users/technicalpickles/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-11T17:29:08Z","updated_at":"2015-09-15T12:37:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/slackhq/hubot-slack/pulls/229","html_url":"https://github.com/slackhq/hubot-slack/pull/229","diff_url":"https://github.com/slackhq/hubot-slack/pull/229.diff","patch_url":"https://github.com/slackhq/hubot-slack/pull/229.patch"},"body":"I wanted access to more details about a user in order to write [listener middleware](https://hubot.github.com/docs/scripting/#listener-middleware) for doing things like blocking access for restricted and bot users.\r\n\r\nThe data is there in hubot-slack, but just not put into hubot's brain. I had considered just adding everything to the user object at the top level, but I think it'd be better to namespace it under `slack`, so it doesn't seem like that's something a script author should be manipulating.\r\n\r\nHere's what it looks like slackbot looks like:\r\n\r\n```\r\n  { id: 'USLACKBOT',\r\n       name: 'slackbot',\r\n       real_name: 'slackbot',\r\n       email_address: '',\r\n       slack: \r\n        { id: 'USLACKBOT',\r\n          name: 'slackbot',\r\n          deleted: false,\r\n          status: null,\r\n          color: '757575',\r\n          real_name: 'slackbot',\r\n          tz: null,\r\n          tz_label: 'Pacific Daylight Time',\r\n          tz_offset: -25200,\r\n          profile: \r\n           { first_name: 'slackbot',\r\n             last_name: '',\r\n             image_24: 'https://slack-assets2.s3-us-west-2.amazonaws.com/10068/img/slackbot_24.png',\r\n             image_32: 'https://slack-assets2.s3-us-west-2.amazonaws.com/10068/img/slackbot_32.png',\r\n             image_48: 'https://slack-assets2.s3-us-west-2.amazonaws.com/10068/img/slackbot_48.png',\r\n             image_72: 'https://slack-assets2.s3-us-west-2.amazonaws.com/10068/img/slackbot_72.png',\r\n             image_192: 'https://slack-assets2.s3-us-west-2.amazonaws.com/10068/img/slackbot_192.png',\r\n             real_name: 'slackbot',\r\n             real_name_normalized: 'slackbot',\r\n             email: '' },\r\n          is_admin: false,\r\n          is_owner: false,\r\n          is_primary_owner: false,\r\n          is_restricted: false,\r\n          is_ultra_restricted: false,\r\n          is_bot: false,\r\n          presence: 'active' } } },\r\n```"},"comment":{"url":"https://api.github.com/repos/slackhq/hubot-slack/issues/comments/140374198","html_url":"https://github.com/slackhq/hubot-slack/pull/229#issuecomment-140374198","issue_url":"https://api.github.com/repos/slackhq/hubot-slack/issues/229","id":140374198,"user":{"login":"jeffbyrnes","id":260553,"avatar_url":"https://avatars.githubusercontent.com/u/260553?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbyrnes","html_url":"https://github.com/jeffbyrnes","followers_url":"https://api.github.com/users/jeffbyrnes/followers","following_url":"https://api.github.com/users/jeffbyrnes/following{/other_user}","gists_url":"https://api.github.com/users/jeffbyrnes/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbyrnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbyrnes/subscriptions","organizations_url":"https://api.github.com/users/jeffbyrnes/orgs","repos_url":"https://api.github.com/users/jeffbyrnes/repos","events_url":"https://api.github.com/users/jeffbyrnes/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbyrnes/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T12:37:28Z","updated_at":"2015-09-15T12:37:28Z","body":"Makes sense. Definitely safer to namespace; you've convinced me."}}