{"action":"created","issue":{"url":"https://api.github.com/repos/akalongman/php-telegram-bot/issues/106","repository_url":"https://api.github.com/repos/akalongman/php-telegram-bot","labels_url":"https://api.github.com/repos/akalongman/php-telegram-bot/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/akalongman/php-telegram-bot/issues/106/comments","events_url":"https://api.github.com/repos/akalongman/php-telegram-bot/issues/106/events","html_url":"https://github.com/akalongman/php-telegram-bot/issues/106","id":136659889,"number":106,"title":"Refactor Telegram.php","user":{"login":"noplanman","id":9423417,"avatar_url":"https://avatars.githubusercontent.com/u/9423417?v=3","gravatar_id":"","url":"https://api.github.com/users/noplanman","html_url":"https://github.com/noplanman","followers_url":"https://api.github.com/users/noplanman/followers","following_url":"https://api.github.com/users/noplanman/following{/other_user}","gists_url":"https://api.github.com/users/noplanman/gists{/gist_id}","starred_url":"https://api.github.com/users/noplanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noplanman/subscriptions","organizations_url":"https://api.github.com/users/noplanman/orgs","repos_url":"https://api.github.com/users/noplanman/repos","events_url":"https://api.github.com/users/noplanman/events{/privacy}","received_events_url":"https://api.github.com/users/noplanman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-26T10:42:47Z","updated_at":"2016-02-27T11:02:08Z","closed_at":null,"body":"This issue is intended as a discussion board and checklist of tasks to refactor the `Telegram` class.\r\n(*new class names are just suggestions and prone to change*)\r\n\r\nThe main objective is to separate the responsibility and to decouple as much as possible.\r\nThe `Telegram` class should handle only the main Telegram API related functionality and thread all sub-processes together by saving necessary objects in member variables, making them available to modify certain features. (i.e. having a `$commander` variable that handles all \"command\" functionality, etc.)\r\n\r\n- [ ] Extract all **command** related functionality to a dedicated `Commander` class.\r\n- [ ] Extract all **logging** related functionality to a dedicated `Logger` class."},"comment":{"url":"https://api.github.com/repos/akalongman/php-telegram-bot/issues/comments/189618505","html_url":"https://github.com/akalongman/php-telegram-bot/issues/106#issuecomment-189618505","issue_url":"https://api.github.com/repos/akalongman/php-telegram-bot/issues/106","id":189618505,"user":{"login":"MBoretto","id":6514506,"avatar_url":"https://avatars.githubusercontent.com/u/6514506?v=3","gravatar_id":"","url":"https://api.github.com/users/MBoretto","html_url":"https://github.com/MBoretto","followers_url":"https://api.github.com/users/MBoretto/followers","following_url":"https://api.github.com/users/MBoretto/following{/other_user}","gists_url":"https://api.github.com/users/MBoretto/gists{/gist_id}","starred_url":"https://api.github.com/users/MBoretto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MBoretto/subscriptions","organizations_url":"https://api.github.com/users/MBoretto/orgs","repos_url":"https://api.github.com/users/MBoretto/repos","events_url":"https://api.github.com/users/MBoretto/events{/privacy}","received_events_url":"https://api.github.com/users/MBoretto/received_events","type":"User","site_admin":false},"created_at":"2016-02-27T11:02:08Z","updated_at":"2016-02-27T11:02:08Z","body":"In the very beginning, there was just a table that stores everything. \r\n- Chat and user object were stored as json string in a table column..\r\n- During develop lot of bugs came out, sometimes i found that data of updates were not stored properly in the table\r\n\r\nRow json log are the only one that contain the 'truth'.\r\nCan be a form of 'retrocompatibily' for table schema changes, and database leakage if any. \r\nMaybe is not a priority but we cant take this in mind."}}