{"action":"created","comment":{"url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/comments/61549073","id":61549073,"diff_hunk":"@@ -14,6 +20,57 @@\n class User extends BaseObject\n {\n     /**\n+     * @var string $currentConversation\n+     */\n+    private $currentConversation;\n+\n+    /**\n+     * @var SQLite3Cache $cache\n+     */\n+    private $cache;\n+\n+    /**\n+     * @inheritdoc\n+     */\n+    public function __construct($data)\n+    {\n+        parent::__construct($data);\n+\n+        $this->cache = new FilesystemCache(__DIR__.'/../Storage/cache');","path":"src/Objects/User.php","position":33,"original_position":33,"commit_id":"3e4626db6f835eee8f7d463cc2b8e5b1fc3349a8","original_commit_id":"3e4626db6f835eee8f7d463cc2b8e5b1fc3349a8","user":{"login":"irazasyed","id":1915268,"avatar_url":"https://avatars.githubusercontent.com/u/1915268?v=3","gravatar_id":"","url":"https://api.github.com/users/irazasyed","html_url":"https://github.com/irazasyed","followers_url":"https://api.github.com/users/irazasyed/followers","following_url":"https://api.github.com/users/irazasyed/following{/other_user}","gists_url":"https://api.github.com/users/irazasyed/gists{/gist_id}","starred_url":"https://api.github.com/users/irazasyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irazasyed/subscriptions","organizations_url":"https://api.github.com/users/irazasyed/orgs","repos_url":"https://api.github.com/users/irazasyed/repos","events_url":"https://api.github.com/users/irazasyed/events{/privacy}","received_events_url":"https://api.github.com/users/irazasyed/received_events","type":"User","site_admin":false},"body":"1. Ok.\r\n2. Not sure I get that.\r\n3. The order is good and makes sense.","created_at":"2016-04-29T08:49:03Z","updated_at":"2016-04-29T08:49:03Z","html_url":"https://github.com/irazasyed/telegram-bot-sdk/pull/171#discussion_r61549073","pull_request_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171","_links":{"self":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/comments/61549073"},"html":{"href":"https://github.com/irazasyed/telegram-bot-sdk/pull/171#discussion_r61549073"},"pull_request":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171"}}},"pull_request":{"url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171","id":68312324,"html_url":"https://github.com/irazasyed/telegram-bot-sdk/pull/171","diff_url":"https://github.com/irazasyed/telegram-bot-sdk/pull/171.diff","patch_url":"https://github.com/irazasyed/telegram-bot-sdk/pull/171.patch","issue_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/171","number":171,"state":"open","locked":false,"title":"Add conversational system (#90)","user":{"login":"tjomamokrenko","id":3625114,"avatar_url":"https://avatars.githubusercontent.com/u/3625114?v=3","gravatar_id":"","url":"https://api.github.com/users/tjomamokrenko","html_url":"https://github.com/tjomamokrenko","followers_url":"https://api.github.com/users/tjomamokrenko/followers","following_url":"https://api.github.com/users/tjomamokrenko/following{/other_user}","gists_url":"https://api.github.com/users/tjomamokrenko/gists{/gist_id}","starred_url":"https://api.github.com/users/tjomamokrenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjomamokrenko/subscriptions","organizations_url":"https://api.github.com/users/tjomamokrenko/orgs","repos_url":"https://api.github.com/users/tjomamokrenko/repos","events_url":"https://api.github.com/users/tjomamokrenko/events{/privacy}","received_events_url":"https://api.github.com/users/tjomamokrenko/received_events","type":"User","site_admin":false},"body":"Bot example:\r\n```php\r\n<?php\r\n\r\nrequire_once 'vendor/autoload.php';\r\n\r\n$telegram = new \\Telegram\\Bot\\Api('secret');\r\n\r\n$telegram->getConversationBus()->addConversations([\r\n    \\Telegram\\Bot\\Conversations\\HelloConversation::class,\r\n    \\Telegram\\Bot\\Conversations\\LeaveMeAloneConversation::class,\r\n]);\r\n\r\n$telegram->conversationsHandler(false);\r\n```\r\n\r\nConversation example:\r\n```php\r\n<?php\r\n\r\n\r\nnamespace Telegram\\Bot\\Conversations;\r\n\r\n\r\n/**\r\n * Class HelloConversation\r\n * @package Telegram\\Bot\\Conversations\r\n * @author Artiom Mocrenco <tjomamokrenko@gmail.com>\r\n */\r\nclass HelloConversation extends Conversation\r\n{\r\n    /**\r\n     * @inheritdoc\r\n     */\r\n    public function handle()\r\n    {\r\n        $text = \\strtolower($this->getUpdate()->getMessage()->getText());\r\n\r\n        if ((strpos($text, 'hi') !== false) || (strpos($text, 'hello') !== false)) {\r\n            $this->replyWithMessage(['text' => \"Hi, {$this->getUpdate()->getMessage()->getFrom()->getFirstName()}!\"]);\r\n            \r\n            $this\r\n                ->getUpdate()\r\n                ->getMessage()\r\n                ->getFrom()\r\n                ->setCurrentConversation(\r\n                    LeaveMeAloneConversation::class\r\n                );\r\n        }\r\n    }\r\n    \r\n}\r\n```\r\n\r\n![screenshot_2016-04-29-03-24-12](https://cloud.githubusercontent.com/assets/3625114/14905697/faae94a2-0dbb-11e6-9ded-57c5c428850d.png)\r\n\r\nNot ready for production until:\r\n- laravel support is added\r\n- a small refactoring is done\r\n- tests are written\r\n\r\nYour thoughts? :smiley: \r\n\r\n","created_at":"2016-04-29T00:46:03Z","updated_at":"2016-04-29T08:49:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2d4f415b77212b1aa2ce5126ad3164fc8b04a2e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171/commits","review_comments_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171/comments","review_comment_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/171/comments","statuses_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/statuses/3e4626db6f835eee8f7d463cc2b8e5b1fc3349a8","head":{"label":"tjomamokrenko:master","ref":"master","sha":"3e4626db6f835eee8f7d463cc2b8e5b1fc3349a8","user":{"login":"tjomamokrenko","id":3625114,"avatar_url":"https://avatars.githubusercontent.com/u/3625114?v=3","gravatar_id":"","url":"https://api.github.com/users/tjomamokrenko","html_url":"https://github.com/tjomamokrenko","followers_url":"https://api.github.com/users/tjomamokrenko/followers","following_url":"https://api.github.com/users/tjomamokrenko/following{/other_user}","gists_url":"https://api.github.com/users/tjomamokrenko/gists{/gist_id}","starred_url":"https://api.github.com/users/tjomamokrenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjomamokrenko/subscriptions","organizations_url":"https://api.github.com/users/tjomamokrenko/orgs","repos_url":"https://api.github.com/users/tjomamokrenko/repos","events_url":"https://api.github.com/users/tjomamokrenko/events{/privacy}","received_events_url":"https://api.github.com/users/tjomamokrenko/received_events","type":"User","site_admin":false},"repo":{"id":57329189,"name":"telegram-bot-sdk","full_name":"tjomamokrenko/telegram-bot-sdk","owner":{"login":"tjomamokrenko","id":3625114,"avatar_url":"https://avatars.githubusercontent.com/u/3625114?v=3","gravatar_id":"","url":"https://api.github.com/users/tjomamokrenko","html_url":"https://github.com/tjomamokrenko","followers_url":"https://api.github.com/users/tjomamokrenko/followers","following_url":"https://api.github.com/users/tjomamokrenko/following{/other_user}","gists_url":"https://api.github.com/users/tjomamokrenko/gists{/gist_id}","starred_url":"https://api.github.com/users/tjomamokrenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjomamokrenko/subscriptions","organizations_url":"https://api.github.com/users/tjomamokrenko/orgs","repos_url":"https://api.github.com/users/tjomamokrenko/repos","events_url":"https://api.github.com/users/tjomamokrenko/events{/privacy}","received_events_url":"https://api.github.com/users/tjomamokrenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tjomamokrenko/telegram-bot-sdk","description":"Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.","fork":true,"url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk","forks_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/forks","keys_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/teams","hooks_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/hooks","issue_events_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/events","assignees_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/tags","blobs_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/languages","stargazers_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/stargazers","contributors_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/contributors","subscribers_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/subscribers","subscription_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/subscription","commits_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/merges","archive_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/downloads","issues_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/labels{/name}","releases_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/tjomamokrenko/telegram-bot-sdk/deployments","created_at":"2016-04-28T19:44:53Z","updated_at":"2016-04-28T19:44:55Z","pushed_at":"2016-04-29T01:15:14Z","git_url":"git://github.com/tjomamokrenko/telegram-bot-sdk.git","ssh_url":"git@github.com:tjomamokrenko/telegram-bot-sdk.git","clone_url":"https://github.com/tjomamokrenko/telegram-bot-sdk.git","svn_url":"https://github.com/tjomamokrenko/telegram-bot-sdk","homepage":"https://telegram-bot-sdk.readme.io/docs","size":1098,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"irazasyed:master","ref":"master","sha":"3a5ae7a8aad0ce679ad7d778bac649b723d1a43d","user":{"login":"irazasyed","id":1915268,"avatar_url":"https://avatars.githubusercontent.com/u/1915268?v=3","gravatar_id":"","url":"https://api.github.com/users/irazasyed","html_url":"https://github.com/irazasyed","followers_url":"https://api.github.com/users/irazasyed/followers","following_url":"https://api.github.com/users/irazasyed/following{/other_user}","gists_url":"https://api.github.com/users/irazasyed/gists{/gist_id}","starred_url":"https://api.github.com/users/irazasyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irazasyed/subscriptions","organizations_url":"https://api.github.com/users/irazasyed/orgs","repos_url":"https://api.github.com/users/irazasyed/repos","events_url":"https://api.github.com/users/irazasyed/events{/privacy}","received_events_url":"https://api.github.com/users/irazasyed/received_events","type":"User","site_admin":false},"repo":{"id":38233033,"name":"telegram-bot-sdk","full_name":"irazasyed/telegram-bot-sdk","owner":{"login":"irazasyed","id":1915268,"avatar_url":"https://avatars.githubusercontent.com/u/1915268?v=3","gravatar_id":"","url":"https://api.github.com/users/irazasyed","html_url":"https://github.com/irazasyed","followers_url":"https://api.github.com/users/irazasyed/followers","following_url":"https://api.github.com/users/irazasyed/following{/other_user}","gists_url":"https://api.github.com/users/irazasyed/gists{/gist_id}","starred_url":"https://api.github.com/users/irazasyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irazasyed/subscriptions","organizations_url":"https://api.github.com/users/irazasyed/orgs","repos_url":"https://api.github.com/users/irazasyed/repos","events_url":"https://api.github.com/users/irazasyed/events{/privacy}","received_events_url":"https://api.github.com/users/irazasyed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/irazasyed/telegram-bot-sdk","description":"Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.","fork":false,"url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk","forks_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/forks","keys_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/teams","hooks_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/hooks","issue_events_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/events","assignees_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/tags","blobs_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/languages","stargazers_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/stargazers","contributors_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/contributors","subscribers_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/subscribers","subscription_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/subscription","commits_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/merges","archive_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/downloads","issues_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/labels{/name}","releases_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/deployments","created_at":"2015-06-29T07:12:35Z","updated_at":"2016-04-29T07:18:18Z","pushed_at":"2016-04-29T01:15:16Z","git_url":"git://github.com/irazasyed/telegram-bot-sdk.git","ssh_url":"git@github.com:irazasyed/telegram-bot-sdk.git","clone_url":"https://github.com/irazasyed/telegram-bot-sdk.git","svn_url":"https://github.com/irazasyed/telegram-bot-sdk","homepage":"https://telegram-bot-sdk.readme.io/docs","size":1135,"stargazers_count":386,"watchers_count":386,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":81,"mirror_url":null,"open_issues_count":7,"forks":81,"open_issues":7,"watchers":386,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171"},"html":{"href":"https://github.com/irazasyed/telegram-bot-sdk/pull/171"},"issue":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/171"},"comments":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/171/comments"},"review_comments":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171/comments"},"review_comment":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/pulls/171/commits"},"statuses":{"href":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/statuses/3e4626db6f835eee8f7d463cc2b8e5b1fc3349a8"}}}}