{"action":"created","comment":{"url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/comments/178011984","pull_request_review_id":107993467,"id":178011984,"diff_hunk":"@@ -40,20 +40,10 @@ def send_text_with_buttons(self, recipient_id, text,\n \n         :button_type custom: custom keyboard\n         \"\"\"\n-        if button_type == \"inline\":\n+        if button_type in (\"inline\", \"vertical\"):\n             button_list = [[InlineKeyboardButton(s[\"title\"],\n                             callback_data=s[\"payload\"]) for s in buttons]]\n             reply_markup = InlineKeyboardMarkup(button_list)\n-            return self.send_message(recipient_id, text,\n-                                     reply_markup=reply_markup)\n-        if button_type == \"vertical\":","path":"rasa_core/channels/telegram.py","position":11,"original_position":11,"commit_id":"345f94cb60e19b439022aef43b5c55bffb3ccfb3","original_commit_id":"345f94cb60e19b439022aef43b5c55bffb3ccfb3","user":{"login":"akelad","id":32450038,"avatar_url":"https://avatars3.githubusercontent.com/u/32450038?v=4","gravatar_id":"","url":"https://api.github.com/users/akelad","html_url":"https://github.com/akelad","followers_url":"https://api.github.com/users/akelad/followers","following_url":"https://api.github.com/users/akelad/following{/other_user}","gists_url":"https://api.github.com/users/akelad/gists{/gist_id}","starred_url":"https://api.github.com/users/akelad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akelad/subscriptions","organizations_url":"https://api.github.com/users/akelad/orgs","repos_url":"https://api.github.com/users/akelad/repos","events_url":"https://api.github.com/users/akelad/events{/privacy}","received_events_url":"https://api.github.com/users/akelad/received_events","type":"User","site_admin":false},"body":"No, there's an important difference that the \"inline\" button is a list of buttons, whereas the \"vertical\" button is a list of lists of buttons. That's the telegram format 😄 \r\nso:\r\n``[[InlineKeyboardButton(s[\"title\"], callback_data=s[\"payload\"]), InlineKeyboardButton(s[\"title\"], callback_data=s[\"payload\"])]]``\r\nvs\r\n``[[InlineKeyboardButton(s[\"title\"],  callback_data=s[\"payload\"])], [InlineKeyboardButton(s[\"title\"],  callback_data=s[\"payload\"])]]``","created_at":"2018-03-29T10:12:58Z","updated_at":"2018-03-29T10:12:58Z","html_url":"https://github.com/RasaHQ/rasa_core/pull/314#discussion_r178011984","pull_request_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/comments/178011984"},"html":{"href":"https://github.com/RasaHQ/rasa_core/pull/314#discussion_r178011984"},"pull_request":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314"}},"in_reply_to_id":177997694},"pull_request":{"url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314","id":177889241,"html_url":"https://github.com/RasaHQ/rasa_core/pull/314","diff_url":"https://github.com/RasaHQ/rasa_core/pull/314.diff","patch_url":"https://github.com/RasaHQ/rasa_core/pull/314.patch","issue_url":"https://api.github.com/repos/RasaHQ/rasa_core/issues/314","number":314,"state":"open","locked":false,"title":"Refactor telegram channel","user":{"login":"filintod","id":1373693,"avatar_url":"https://avatars0.githubusercontent.com/u/1373693?v=4","gravatar_id":"","url":"https://api.github.com/users/filintod","html_url":"https://github.com/filintod","followers_url":"https://api.github.com/users/filintod/followers","following_url":"https://api.github.com/users/filintod/following{/other_user}","gists_url":"https://api.github.com/users/filintod/gists{/gist_id}","starred_url":"https://api.github.com/users/filintod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filintod/subscriptions","organizations_url":"https://api.github.com/users/filintod/orgs","repos_url":"https://api.github.com/users/filintod/repos","events_url":"https://api.github.com/users/filintod/events{/privacy}","received_events_url":"https://api.github.com/users/filintod/received_events","type":"User","site_admin":false},"body":"**Proposed changes**:\r\n- I noticed there were two log messages enter after a return in TelegramInput.set_webhook that would never get executed. I also change logger.warn with logger.warning as the warn method is set for deprecation for a while.\r\n\r\nAfter looking at the code I also saw some repeated code in TelegramOutput.send_text_with_buttons that could be simplified\r\n\r\n**Status (please check what you already did)**:\r\n- [x] made PR ready for code review\r\n- [ ] added some tests for the functionality\r\n- [ ] updated the documentation\r\n- [ ] updated the changelog\r\n","created_at":"2018-03-27T23:08:09Z","updated_at":"2018-03-29T10:12:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed271bf963212c46a0b59ed84a185631fb352671","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314/commits","review_comments_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314/comments","review_comment_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RasaHQ/rasa_core/issues/314/comments","statuses_url":"https://api.github.com/repos/RasaHQ/rasa_core/statuses/345f94cb60e19b439022aef43b5c55bffb3ccfb3","head":{"label":"filintod:master","ref":"master","sha":"345f94cb60e19b439022aef43b5c55bffb3ccfb3","user":{"login":"filintod","id":1373693,"avatar_url":"https://avatars0.githubusercontent.com/u/1373693?v=4","gravatar_id":"","url":"https://api.github.com/users/filintod","html_url":"https://github.com/filintod","followers_url":"https://api.github.com/users/filintod/followers","following_url":"https://api.github.com/users/filintod/following{/other_user}","gists_url":"https://api.github.com/users/filintod/gists{/gist_id}","starred_url":"https://api.github.com/users/filintod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filintod/subscriptions","organizations_url":"https://api.github.com/users/filintod/orgs","repos_url":"https://api.github.com/users/filintod/repos","events_url":"https://api.github.com/users/filintod/events{/privacy}","received_events_url":"https://api.github.com/users/filintod/received_events","type":"User","site_admin":false},"repo":{"id":127002835,"name":"rasa_core","full_name":"filintod/rasa_core","owner":{"login":"filintod","id":1373693,"avatar_url":"https://avatars0.githubusercontent.com/u/1373693?v=4","gravatar_id":"","url":"https://api.github.com/users/filintod","html_url":"https://github.com/filintod","followers_url":"https://api.github.com/users/filintod/followers","following_url":"https://api.github.com/users/filintod/following{/other_user}","gists_url":"https://api.github.com/users/filintod/gists{/gist_id}","starred_url":"https://api.github.com/users/filintod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filintod/subscriptions","organizations_url":"https://api.github.com/users/filintod/orgs","repos_url":"https://api.github.com/users/filintod/repos","events_url":"https://api.github.com/users/filintod/events{/privacy}","received_events_url":"https://api.github.com/users/filintod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/filintod/rasa_core","description":"machine learning based dialogue engine for conversational software","fork":true,"url":"https://api.github.com/repos/filintod/rasa_core","forks_url":"https://api.github.com/repos/filintod/rasa_core/forks","keys_url":"https://api.github.com/repos/filintod/rasa_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/filintod/rasa_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/filintod/rasa_core/teams","hooks_url":"https://api.github.com/repos/filintod/rasa_core/hooks","issue_events_url":"https://api.github.com/repos/filintod/rasa_core/issues/events{/number}","events_url":"https://api.github.com/repos/filintod/rasa_core/events","assignees_url":"https://api.github.com/repos/filintod/rasa_core/assignees{/user}","branches_url":"https://api.github.com/repos/filintod/rasa_core/branches{/branch}","tags_url":"https://api.github.com/repos/filintod/rasa_core/tags","blobs_url":"https://api.github.com/repos/filintod/rasa_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/filintod/rasa_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/filintod/rasa_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/filintod/rasa_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/filintod/rasa_core/statuses/{sha}","languages_url":"https://api.github.com/repos/filintod/rasa_core/languages","stargazers_url":"https://api.github.com/repos/filintod/rasa_core/stargazers","contributors_url":"https://api.github.com/repos/filintod/rasa_core/contributors","subscribers_url":"https://api.github.com/repos/filintod/rasa_core/subscribers","subscription_url":"https://api.github.com/repos/filintod/rasa_core/subscription","commits_url":"https://api.github.com/repos/filintod/rasa_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/filintod/rasa_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/filintod/rasa_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/filintod/rasa_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/filintod/rasa_core/contents/{+path}","compare_url":"https://api.github.com/repos/filintod/rasa_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/filintod/rasa_core/merges","archive_url":"https://api.github.com/repos/filintod/rasa_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/filintod/rasa_core/downloads","issues_url":"https://api.github.com/repos/filintod/rasa_core/issues{/number}","pulls_url":"https://api.github.com/repos/filintod/rasa_core/pulls{/number}","milestones_url":"https://api.github.com/repos/filintod/rasa_core/milestones{/number}","notifications_url":"https://api.github.com/repos/filintod/rasa_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/filintod/rasa_core/labels{/name}","releases_url":"https://api.github.com/repos/filintod/rasa_core/releases{/id}","deployments_url":"https://api.github.com/repos/filintod/rasa_core/deployments","created_at":"2018-03-27T14:53:17Z","updated_at":"2018-03-27T23:14:41Z","pushed_at":"2018-03-27T23:14:39Z","git_url":"git://github.com/filintod/rasa_core.git","ssh_url":"git@github.com:filintod/rasa_core.git","clone_url":"https://github.com/filintod/rasa_core.git","svn_url":"https://github.com/filintod/rasa_core","homepage":"https://core.rasa.com","size":88848,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"RasaHQ:master","ref":"master","sha":"20889d10d0596a579a8b2b22e86ca29e91e8f91a","user":{"login":"RasaHQ","id":21214473,"avatar_url":"https://avatars0.githubusercontent.com/u/21214473?v=4","gravatar_id":"","url":"https://api.github.com/users/RasaHQ","html_url":"https://github.com/RasaHQ","followers_url":"https://api.github.com/users/RasaHQ/followers","following_url":"https://api.github.com/users/RasaHQ/following{/other_user}","gists_url":"https://api.github.com/users/RasaHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/RasaHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RasaHQ/subscriptions","organizations_url":"https://api.github.com/users/RasaHQ/orgs","repos_url":"https://api.github.com/users/RasaHQ/repos","events_url":"https://api.github.com/users/RasaHQ/events{/privacy}","received_events_url":"https://api.github.com/users/RasaHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":103934044,"name":"rasa_core","full_name":"RasaHQ/rasa_core","owner":{"login":"RasaHQ","id":21214473,"avatar_url":"https://avatars0.githubusercontent.com/u/21214473?v=4","gravatar_id":"","url":"https://api.github.com/users/RasaHQ","html_url":"https://github.com/RasaHQ","followers_url":"https://api.github.com/users/RasaHQ/followers","following_url":"https://api.github.com/users/RasaHQ/following{/other_user}","gists_url":"https://api.github.com/users/RasaHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/RasaHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RasaHQ/subscriptions","organizations_url":"https://api.github.com/users/RasaHQ/orgs","repos_url":"https://api.github.com/users/RasaHQ/repos","events_url":"https://api.github.com/users/RasaHQ/events{/privacy}","received_events_url":"https://api.github.com/users/RasaHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RasaHQ/rasa_core","description":"machine learning based dialogue engine for conversational software","fork":false,"url":"https://api.github.com/repos/RasaHQ/rasa_core","forks_url":"https://api.github.com/repos/RasaHQ/rasa_core/forks","keys_url":"https://api.github.com/repos/RasaHQ/rasa_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RasaHQ/rasa_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RasaHQ/rasa_core/teams","hooks_url":"https://api.github.com/repos/RasaHQ/rasa_core/hooks","issue_events_url":"https://api.github.com/repos/RasaHQ/rasa_core/issues/events{/number}","events_url":"https://api.github.com/repos/RasaHQ/rasa_core/events","assignees_url":"https://api.github.com/repos/RasaHQ/rasa_core/assignees{/user}","branches_url":"https://api.github.com/repos/RasaHQ/rasa_core/branches{/branch}","tags_url":"https://api.github.com/repos/RasaHQ/rasa_core/tags","blobs_url":"https://api.github.com/repos/RasaHQ/rasa_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RasaHQ/rasa_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RasaHQ/rasa_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/RasaHQ/rasa_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RasaHQ/rasa_core/statuses/{sha}","languages_url":"https://api.github.com/repos/RasaHQ/rasa_core/languages","stargazers_url":"https://api.github.com/repos/RasaHQ/rasa_core/stargazers","contributors_url":"https://api.github.com/repos/RasaHQ/rasa_core/contributors","subscribers_url":"https://api.github.com/repos/RasaHQ/rasa_core/subscribers","subscription_url":"https://api.github.com/repos/RasaHQ/rasa_core/subscription","commits_url":"https://api.github.com/repos/RasaHQ/rasa_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/RasaHQ/rasa_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/RasaHQ/rasa_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/RasaHQ/rasa_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/RasaHQ/rasa_core/contents/{+path}","compare_url":"https://api.github.com/repos/RasaHQ/rasa_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RasaHQ/rasa_core/merges","archive_url":"https://api.github.com/repos/RasaHQ/rasa_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RasaHQ/rasa_core/downloads","issues_url":"https://api.github.com/repos/RasaHQ/rasa_core/issues{/number}","pulls_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls{/number}","milestones_url":"https://api.github.com/repos/RasaHQ/rasa_core/milestones{/number}","notifications_url":"https://api.github.com/repos/RasaHQ/rasa_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RasaHQ/rasa_core/labels{/name}","releases_url":"https://api.github.com/repos/RasaHQ/rasa_core/releases{/id}","deployments_url":"https://api.github.com/repos/RasaHQ/rasa_core/deployments","created_at":"2017-09-18T12:07:12Z","updated_at":"2018-03-29T07:54:37Z","pushed_at":"2018-03-28T10:39:36Z","git_url":"git://github.com/RasaHQ/rasa_core.git","ssh_url":"git@github.com:RasaHQ/rasa_core.git","clone_url":"https://github.com/RasaHQ/rasa_core.git","svn_url":"https://github.com/RasaHQ/rasa_core","homepage":"https://core.rasa.com","size":89352,"stargazers_count":631,"watchers_count":631,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":300,"mirror_url":null,"archived":false,"open_issues_count":74,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":300,"open_issues":74,"watchers":631,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314"},"html":{"href":"https://github.com/RasaHQ/rasa_core/pull/314"},"issue":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/issues/314"},"comments":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/issues/314/comments"},"review_comments":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314/comments"},"review_comment":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/314/commits"},"statuses":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/statuses/345f94cb60e19b439022aef43b5c55bffb3ccfb3"}},"author_association":"NONE"}}
{"actor":{"display_login":"akelad"}}