{"action":"created","comment":{"url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/comments/237216884","pull_request_review_id":179462445,"id":237216884,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzIxNjg4NA==","diff_hunk":"@@ -141,11 +137,24 @@ def disconnect(sid):\n             logger.debug(\"User {} disconnected from socketio endpoint.\"\n                          \"\".format(sid))\n \n+        @sio.on('session_request', namespace=self.namespace)\n+        def session_request(sid, data):\n+            if data is None:\n+                data = {}\n+            if 'session_id' not in data or data['session_id'] is None:\n+                data['session_id'] = str(uuid.uuid4())\n+            sio.emit(\"session_confirm\", data['session_id'])\n+            logger.debug(\"User {} disconnected from socketio endpoint.\"\n+                         \"\".format(sid))\n+\n         @sio.on(self.user_message_evt, namespace=self.namespace)\n         def handle_message(sid, data):\n-            output_channel = SocketIOOutput(sio, self.bot_message_evt)\n-            message = UserMessage(data['message'], output_channel, sid,\n-                                  input_channel=self.name())\n-            on_new_message(message)\n-\n-        return socketio_webhook\n+            output_channel = SocketIOOutput(sio, sid, self.bot_message_evt)\n+            if \"session_id\" not in data or data[\"session_id\"] is None:\n+                logger.warning(\"A message without a valid sender_id was received\")","path":"rasa_core/channels/socketio.py","position":null,"original_position":114,"commit_id":"f9b1c8d650591084a7eb09b6143ff42561cbc87a","original_commit_id":"03a9977213b0c29dd411db0d9beddb7283eeb82f","user":{"login":"znat","id":3694634,"node_id":"MDQ6VXNlcjM2OTQ2MzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3694634?v=4","gravatar_id":"","url":"https://api.github.com/users/znat","html_url":"https://github.com/znat","followers_url":"https://api.github.com/users/znat/followers","following_url":"https://api.github.com/users/znat/following{/other_user}","gists_url":"https://api.github.com/users/znat/gists{/gist_id}","starred_url":"https://api.github.com/users/znat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/znat/subscriptions","organizations_url":"https://api.github.com/users/znat/orgs","repos_url":"https://api.github.com/users/znat/repos","events_url":"https://api.github.com/users/znat/events{/privacy}","received_events_url":"https://api.github.com/users/znat/received_events","type":"User","site_admin":false},"body":"To avoid breaking changes I added a flag in the credentials and put a condition here. ","created_at":"2018-11-28T18:56:48Z","updated_at":"2018-11-28T18:56:49Z","html_url":"https://github.com/RasaHQ/rasa_core/pull/1379#discussion_r237216884","pull_request_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/1379","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/comments/237216884"},"html":{"href":"https://github.com/RasaHQ/rasa_core/pull/1379#discussion_r237216884"},"pull_request":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/1379"}},"in_reply_to_id":236604191},"pull_request":{"url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/1379","id":232780501,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNzgwNTAx","html_url":"https://github.com/RasaHQ/rasa_core/pull/1379","diff_url":"https://github.com/RasaHQ/rasa_core/pull/1379.diff","patch_url":"https://github.com/RasaHQ/rasa_core/pull/1379.patch","issue_url":"https://api.github.com/repos/RasaHQ/rasa_core/issues/1379","number":1379,"state":"open","locked":false,"title":"SocketIOInput channel - Support for persistent sessions","user":{"login":"znat","id":3694634,"node_id":"MDQ6VXNlcjM2OTQ2MzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3694634?v=4","gravatar_id":"","url":"https://api.github.com/users/znat","html_url":"https://github.com/znat","followers_url":"https://api.github.com/users/znat/followers","following_url":"https://api.github.com/users/znat/following{/other_user}","gists_url":"https://api.github.com/users/znat/gists{/gist_id}","starred_url":"https://api.github.com/users/znat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/znat/subscriptions","organizations_url":"https://api.github.com/users/znat/orgs","repos_url":"https://api.github.com/users/znat/repos","events_url":"https://api.github.com/users/znat/events{/privacy}","received_events_url":"https://api.github.com/users/znat/received_events","type":"User","site_admin":false},"body":"**Proposed changes**:\r\nA boolean `session_persistence` parameter defaulting to `false` has been added to the `socketio` credentials to avoid breaking changes. It must be set to `true` \r\n\r\n\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- [x ] updated the documentation\r\n- [ x] updated the changelog\r\n","created_at":"2018-11-21T19:46:36Z","updated_at":"2018-11-28T18:56:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33fcd038ec5f1b6a02f591af42f299f0bdaabba9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/1379/commits","review_comments_url":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/1379/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/1379/comments","statuses_url":"https://api.github.com/repos/RasaHQ/rasa_core/statuses/f9b1c8d650591084a7eb09b6143ff42561cbc87a","head":{"label":"mrbot-ai:socket-io-support-persistent-sessions","ref":"socket-io-support-persistent-sessions","sha":"f9b1c8d650591084a7eb09b6143ff42561cbc87a","user":{"login":"mrbot-ai","id":24684679,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0Njg0Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/24684679?v=4","gravatar_id":"","url":"https://api.github.com/users/mrbot-ai","html_url":"https://github.com/mrbot-ai","followers_url":"https://api.github.com/users/mrbot-ai/followers","following_url":"https://api.github.com/users/mrbot-ai/following{/other_user}","gists_url":"https://api.github.com/users/mrbot-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbot-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbot-ai/subscriptions","organizations_url":"https://api.github.com/users/mrbot-ai/orgs","repos_url":"https://api.github.com/users/mrbot-ai/repos","events_url":"https://api.github.com/users/mrbot-ai/events{/privacy}","received_events_url":"https://api.github.com/users/mrbot-ai/received_events","type":"Organization","site_admin":false},"repo":{"id":118126769,"node_id":"MDEwOlJlcG9zaXRvcnkxMTgxMjY3Njk=","name":"rasa_core","full_name":"mrbot-ai/rasa_core","private":false,"owner":{"login":"mrbot-ai","id":24684679,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0Njg0Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/24684679?v=4","gravatar_id":"","url":"https://api.github.com/users/mrbot-ai","html_url":"https://github.com/mrbot-ai","followers_url":"https://api.github.com/users/mrbot-ai/followers","following_url":"https://api.github.com/users/mrbot-ai/following{/other_user}","gists_url":"https://api.github.com/users/mrbot-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbot-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbot-ai/subscriptions","organizations_url":"https://api.github.com/users/mrbot-ai/orgs","repos_url":"https://api.github.com/users/mrbot-ai/repos","events_url":"https://api.github.com/users/mrbot-ai/events{/privacy}","received_events_url":"https://api.github.com/users/mrbot-ai/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mrbot-ai/rasa_core","description":"machine learning based dialogue engine for conversational software","fork":true,"url":"https://api.github.com/repos/mrbot-ai/rasa_core","forks_url":"https://api.github.com/repos/mrbot-ai/rasa_core/forks","keys_url":"https://api.github.com/repos/mrbot-ai/rasa_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrbot-ai/rasa_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrbot-ai/rasa_core/teams","hooks_url":"https://api.github.com/repos/mrbot-ai/rasa_core/hooks","issue_events_url":"https://api.github.com/repos/mrbot-ai/rasa_core/issues/events{/number}","events_url":"https://api.github.com/repos/mrbot-ai/rasa_core/events","assignees_url":"https://api.github.com/repos/mrbot-ai/rasa_core/assignees{/user}","branches_url":"https://api.github.com/repos/mrbot-ai/rasa_core/branches{/branch}","tags_url":"https://api.github.com/repos/mrbot-ai/rasa_core/tags","blobs_url":"https://api.github.com/repos/mrbot-ai/rasa_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrbot-ai/rasa_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrbot-ai/rasa_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrbot-ai/rasa_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrbot-ai/rasa_core/statuses/{sha}","languages_url":"https://api.github.com/repos/mrbot-ai/rasa_core/languages","stargazers_url":"https://api.github.com/repos/mrbot-ai/rasa_core/stargazers","contributors_url":"https://api.github.com/repos/mrbot-ai/rasa_core/contributors","subscribers_url":"https://api.github.com/repos/mrbot-ai/rasa_core/subscribers","subscription_url":"https://api.github.com/repos/mrbot-ai/rasa_core/subscription","commits_url":"https://api.github.com/repos/mrbot-ai/rasa_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrbot-ai/rasa_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrbot-ai/rasa_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrbot-ai/rasa_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrbot-ai/rasa_core/contents/{+path}","compare_url":"https://api.github.com/repos/mrbot-ai/rasa_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrbot-ai/rasa_core/merges","archive_url":"https://api.github.com/repos/mrbot-ai/rasa_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrbot-ai/rasa_core/downloads","issues_url":"https://api.github.com/repos/mrbot-ai/rasa_core/issues{/number}","pulls_url":"https://api.github.com/repos/mrbot-ai/rasa_core/pulls{/number}","milestones_url":"https://api.github.com/repos/mrbot-ai/rasa_core/milestones{/number}","notifications_url":"https://api.github.com/repos/mrbot-ai/rasa_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrbot-ai/rasa_core/labels{/name}","releases_url":"https://api.github.com/repos/mrbot-ai/rasa_core/releases{/id}","deployments_url":"https://api.github.com/repos/mrbot-ai/rasa_core/deployments","created_at":"2018-01-19T13:13:48Z","updated_at":"2018-07-03T16:04:17Z","pushed_at":"2018-11-28T16:19:34Z","git_url":"git://github.com/mrbot-ai/rasa_core.git","ssh_url":"git@github.com:mrbot-ai/rasa_core.git","clone_url":"https://github.com/mrbot-ai/rasa_core.git","svn_url":"https://github.com/mrbot-ai/rasa_core","homepage":"https://core.rasa.ai/","size":61485,"stargazers_count":1,"watchers_count":1,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"RasaHQ:master","ref":"master","sha":"c82d9107021d7d681f4beb60b7dbdb7ff60a7031","user":{"login":"RasaHQ","id":21214473,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMjE0NDcz","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM5MzQwNDQ=","name":"rasa_core","full_name":"RasaHQ/rasa_core","private":false,"owner":{"login":"RasaHQ","id":21214473,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMjE0NDcz","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},"html_url":"https://github.com/RasaHQ/rasa_core","description":"machine learning based dialogue engine for AI assistants","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-11-28T17:00:54Z","pushed_at":"2018-11-28T18:44:25Z","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://rasa.com/docs/core/","size":588953,"stargazers_count":1299,"watchers_count":1299,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":688,"mirror_url":null,"archived":false,"open_issues_count":144,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":688,"open_issues":144,"watchers":1299,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/1379"},"html":{"href":"https://github.com/RasaHQ/rasa_core/pull/1379"},"issue":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/issues/1379"},"comments":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/issues/1379/comments"},"review_comments":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/pulls/1379/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/1379/commits"},"statuses":{"href":"https://api.github.com/repos/RasaHQ/rasa_core/statuses/f9b1c8d650591084a7eb09b6143ff42561cbc87a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"znat"}}