{"action":"opened","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8665","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8665/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8665/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8665/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/8665","id":268872418,"number":8665,"title":"[FIX] Missing the room name in the /api/v1/im.list REST API result.","user":{"login":"filipedelimabrito","id":11776825,"avatar_url":"https://avatars0.githubusercontent.com/u/11776825?v=4","gravatar_id":"","url":"https://api.github.com/users/filipedelimabrito","html_url":"https://github.com/filipedelimabrito","followers_url":"https://api.github.com/users/filipedelimabrito/followers","following_url":"https://api.github.com/users/filipedelimabrito/following{/other_user}","gists_url":"https://api.github.com/users/filipedelimabrito/gists{/gist_id}","starred_url":"https://api.github.com/users/filipedelimabrito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipedelimabrito/subscriptions","organizations_url":"https://api.github.com/users/filipedelimabrito/orgs","repos_url":"https://api.github.com/users/filipedelimabrito/repos","events_url":"https://api.github.com/users/filipedelimabrito/events{/privacy}","received_events_url":"https://api.github.com/users/filipedelimabrito/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-26T18:57:25Z","updated_at":"2017-10-26T18:57:25Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description:\r\n\r\nThere is not the room name key in the [/api/v1/im.list](https://docs.rocket.chat/developer-guides/rest-api/im/list) REST API result.\r\n\r\n### Server Setup Information:\r\n\r\n* Version of Rocket.Chat Server: 0.59.2 (`open.rocket.chat`)\r\n\r\n### Steps to Reproduce:\r\n\r\n1. Simply call the /api/v1/im.list REST API.\r\n2. See the JSON result.\r\n\r\n### Expected behavior:\r\n\r\nThe JSON result should be with the room name, like:\r\n```\r\n{\r\n   \"total\":1,\r\n   \"offset\":0,\r\n   \"success\":true,\r\n   \"count\":1,\r\n   \"ims\":[\r\n      {\r\n         \"msgs\":90,\r\n         \"lm\":\"2017-09-29T14:43:54.207Z\",\r\n         \"t\":\"d\",\r\n         \"usernames\":[\r\n            \"you.username\",\r\n            \"username.of.the.other.user\"\r\n         ],\r\n         \"_id\":\"8WCaFa2Jve4FNjMYacBD6dHc7oBvGjkruM\",\r\n         \"name\":\"username.of.the.other.user\",\r\n         \"_updatedAt\":\"2017-09-29T14:43:54.286Z\",\r\n         \"ts\":\"2017-08-15T17:56:09.013Z\"\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\n### Actual behavior:\r\n\r\n```\r\n{\r\n   \"total\":1,\r\n   \"offset\":0,\r\n   \"success\":true,\r\n   \"count\":1,\r\n   \"ims\":[\r\n      {\r\n         \"msgs\":90,\r\n         \"lm\":\"2017-09-29T14:43:54.207Z\",\r\n         \"t\":\"d\",\r\n         \"usernames\":[\r\n            \"you.username\",\r\n            \"username.of.the.other.user\"\r\n         ],\r\n         \"_id\":\"8WCaFa2Jve4FNjMYacBD6dHc7oBvGjkruM\",\r\n         \"_updatedAt\":\"2017-09-29T14:43:54.286Z\",\r\n         \"ts\":\"2017-08-15T17:56:09.013Z\"\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\n### Note:\r\n\r\nIf we are using \"Real names\" enabled, we won't have the user's real name just by getting this API. I think that the API should, at least, return all the values that we need in order to use it. I also think that the logic *should* be handled by the API related to what value should I display or not.\r\n\r\n```\r\n{\r\n    \"lm\":\"2017-08-18T18:01:33.580Z\",\r\n    \"t\":\"d\",\r\n    \"title\": \"The title\",\r\n    \"otherUser\": { ${userObject} },\r\n    \"lastMessage\": \"Foobar...\",\r\n    \"_id\":\"8WCaFa2Jve4FNjMYaEBxBoWMx8GfzNndNT\",\r\n    \"unread\": 15,\r\n    \"alert\": 2\r\n}\r\n```"}}
{"actor":{"display_login":"filipedelimabrito"}}