{"action":"closed","issue":{"url":"https://api.github.com/repos/cburschka/cadence/issues/276","labels_url":"https://api.github.com/repos/cburschka/cadence/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/cburschka/cadence/issues/276/comments","events_url":"https://api.github.com/repos/cburschka/cadence/issues/276/events","html_url":"https://github.com/cburschka/cadence/issues/276","id":118935083,"number":276,"title":"Crash when hiding verbose messages and joining a room you're already in.","user":{"login":"cburschka","id":1448001,"avatar_url":"https://avatars.githubusercontent.com/u/1448001?v=3","gravatar_id":"","url":"https://api.github.com/users/cburschka","html_url":"https://github.com/cburschka","followers_url":"https://api.github.com/users/cburschka/followers","following_url":"https://api.github.com/users/cburschka/following{/other_user}","gists_url":"https://api.github.com/users/cburschka/gists{/gist_id}","starred_url":"https://api.github.com/users/cburschka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburschka/subscriptions","organizations_url":"https://api.github.com/users/cburschka/orgs","repos_url":"https://api.github.com/users/cburschka/repos","events_url":"https://api.github.com/users/cburschka/events{/privacy}","received_events_url":"https://api.github.com/users/cburschka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cburschka/cadence/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"cburschka","id":1448001,"avatar_url":"https://avatars.githubusercontent.com/u/1448001?v=3","gravatar_id":"","url":"https://api.github.com/users/cburschka","html_url":"https://github.com/cburschka","followers_url":"https://api.github.com/users/cburschka/followers","following_url":"https://api.github.com/users/cburschka/following{/other_user}","gists_url":"https://api.github.com/users/cburschka/gists{/gist_id}","starred_url":"https://api.github.com/users/cburschka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburschka/subscriptions","organizations_url":"https://api.github.com/users/cburschka/orgs","repos_url":"https://api.github.com/users/cburschka/repos","events_url":"https://api.github.com/users/cburschka/events{/privacy}","received_events_url":"https://api.github.com/users/cburschka/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cburschka/cadence/milestones/12","html_url":"https://github.com/cburschka/cadence/milestones/cadence%201.10","labels_url":"https://api.github.com/repos/cburschka/cadence/milestones/12/labels","id":1100558,"number":12,"title":"cadence 1.10","description":"","creator":{"login":"cburschka","id":1448001,"avatar_url":"https://avatars.githubusercontent.com/u/1448001?v=3","gravatar_id":"","url":"https://api.github.com/users/cburschka","html_url":"https://github.com/cburschka","followers_url":"https://api.github.com/users/cburschka/followers","following_url":"https://api.github.com/users/cburschka/following{/other_user}","gists_url":"https://api.github.com/users/cburschka/gists{/gist_id}","starred_url":"https://api.github.com/users/cburschka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburschka/subscriptions","organizations_url":"https://api.github.com/users/cburschka/orgs","repos_url":"https://api.github.com/users/cburschka/repos","events_url":"https://api.github.com/users/cburschka/events{/privacy}","received_events_url":"https://api.github.com/users/cburschka/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":8,"state":"open","created_at":"2015-05-07T16:58:10Z","updated_at":"2015-11-25T23:05:09Z","due_on":"2015-09-30T22:00:00Z","closed_at":null},"comments":4,"created_at":"2015-11-25T22:31:49Z","updated_at":"2015-11-25T23:05:09Z","closed_at":"2015-11-25T23:05:09Z","body":"When verbose status messages are disabled, and the message pane is empty, the room history may cause a crash because ui.messageInsert() chokes on an empty `ui.messages` array.\r\n\r\nOffending code:\r\n\r\n```\r\n    var c = this.messages.length;\r\n    if (message.timestamp < this.messages[0].timestamp) {\r\n      message.offset = 0;\r\n      this.messages[0].html.before(message.html);\r\n      this.messages = [message].concat(this.messages);\r\n    }\r\n```\r\n\r\nJust add a `if (c == 0) return this.messageAppend(message);` to the top there."}}