{"action":"created","issue":{"url":"https://api.github.com/repos/RocketChat/hubot-rocketchat/issues/178","repository_url":"https://api.github.com/repos/RocketChat/hubot-rocketchat","labels_url":"https://api.github.com/repos/RocketChat/hubot-rocketchat/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/hubot-rocketchat/issues/178/comments","events_url":"https://api.github.com/repos/RocketChat/hubot-rocketchat/issues/178/events","html_url":"https://github.com/RocketChat/hubot-rocketchat/issues/178","id":182256276,"number":178,"title":"Hubot's brain is reset when I change rooms","user":{"login":"kevinkuszyk","id":2734580,"avatar_url":"https://avatars.githubusercontent.com/u/2734580?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinkuszyk","html_url":"https://github.com/kevinkuszyk","followers_url":"https://api.github.com/users/kevinkuszyk/followers","following_url":"https://api.github.com/users/kevinkuszyk/following{/other_user}","gists_url":"https://api.github.com/users/kevinkuszyk/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkuszyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkuszyk/subscriptions","organizations_url":"https://api.github.com/users/kevinkuszyk/orgs","repos_url":"https://api.github.com/users/kevinkuszyk/repos","events_url":"https://api.github.com/users/kevinkuszyk/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkuszyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-11T12:54:59Z","updated_at":"2016-10-11T16:33:19Z","closed_at":null,"body":"I'm using [hubot-azure-scripts](https://github.com/bfcamara/hubot-azure-scripts) to persist my Hubot's brain into Azure blob storage, and I have some code like this to save custom attributes to users:\r\n\r\n```coffeescript\r\nmsg.message.user.teamcity.username = teamcityLogin\r\n```\r\n\r\nEverything is working well, and I can see my custom attributes saved into the `brain-dump.json` file:\r\n\r\n```json\r\n{  \r\n   \"users\":{  \r\n      \"PP4JXZLw5pdWdWdDs\":{  \r\n         \"id\":\"PP4JXZLw5pdWdWdDs\",\r\n         \"name\":\"kevin\",\r\n         \"room\":\"qwKmzsBrwouvAY3Br\",\r\n         \"teamcity\":{  \r\n            \"username\":\"kevin\"\r\n         }\r\n      }\r\n   },\r\n}\r\n```\r\n\r\nHowever when I change rooms and send the bot a message, my custom attributes are lost:\r\n\r\n```json\r\n{\r\n   \"users\":{\r\n      \"PP4JXZLw5pdWdWdDs\":{\r\n         \"id\":\"PP4JXZLw5pdWdWdDs\",\r\n         \"name\":\"kevin\",\r\n         \"room\":\"Zy2ew95zTKhxyd3uj\"\r\n      }\r\n   }\r\n}\r\n```\r\n\r\nHave you seen anything like this before, and can you offer a steer on what I might do to fix it?  Thanks!"},"comment":{"url":"https://api.github.com/repos/RocketChat/hubot-rocketchat/issues/comments/252970970","html_url":"https://github.com/RocketChat/hubot-rocketchat/issues/178#issuecomment-252970970","issue_url":"https://api.github.com/repos/RocketChat/hubot-rocketchat/issues/178","id":252970970,"user":{"login":"geekgonecrazy","id":51996,"avatar_url":"https://avatars.githubusercontent.com/u/51996?v=3","gravatar_id":"","url":"https://api.github.com/users/geekgonecrazy","html_url":"https://github.com/geekgonecrazy","followers_url":"https://api.github.com/users/geekgonecrazy/followers","following_url":"https://api.github.com/users/geekgonecrazy/following{/other_user}","gists_url":"https://api.github.com/users/geekgonecrazy/gists{/gist_id}","starred_url":"https://api.github.com/users/geekgonecrazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geekgonecrazy/subscriptions","organizations_url":"https://api.github.com/users/geekgonecrazy/orgs","repos_url":"https://api.github.com/users/geekgonecrazy/repos","events_url":"https://api.github.com/users/geekgonecrazy/events{/privacy}","received_events_url":"https://api.github.com/users/geekgonecrazy/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T16:33:19Z","updated_at":"2016-10-11T16:33:19Z","body":"How are you actually saving or adding to the hubot brain?  "}}
{"actor":{"display_login":"geekgonecrazy"}}