{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/greyblake/telebot/pulls/1","id":45425172,"html_url":"https://github.com/greyblake/telebot/pull/1","diff_url":"https://github.com/greyblake/telebot/pull/1.diff","patch_url":"https://github.com/greyblake/telebot/pull/1.patch","issue_url":"https://api.github.com/repos/greyblake/telebot/issues/1","number":1,"state":"open","locked":false,"title":"Mark updates as confirmed using offset + 1 as described in Bot API","user":{"login":"byrney","id":6205096,"avatar_url":"https://avatars.githubusercontent.com/u/6205096?v=3","gravatar_id":"","url":"https://api.github.com/users/byrney","html_url":"https://github.com/byrney","followers_url":"https://api.github.com/users/byrney/followers","following_url":"https://api.github.com/users/byrney/following{/other_user}","gists_url":"https://api.github.com/users/byrney/gists{/gist_id}","starred_url":"https://api.github.com/users/byrney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byrney/subscriptions","organizations_url":"https://api.github.com/users/byrney/orgs","repos_url":"https://api.github.com/users/byrney/repos","events_url":"https://api.github.com/users/byrney/events{/privacy}","received_events_url":"https://api.github.com/users/byrney/received_events","type":"User","site_admin":false},"body":"Each time my bot restarted it always got the last message again. The Bot API can mark updates as confirmed, in which case they will not be redelivered but only when they are strictly less than the offset.\r\n\r\nI made the change recommended in the Api Docs and pass last_update + 1 as the offset.\r\n\r\n","created_at":"2015-09-18T16:21:59Z","updated_at":"2015-09-18T16:21:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/greyblake/telebot/pulls/1/commits","review_comments_url":"https://api.github.com/repos/greyblake/telebot/pulls/1/comments","review_comment_url":"https://api.github.com/repos/greyblake/telebot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greyblake/telebot/issues/1/comments","statuses_url":"https://api.github.com/repos/greyblake/telebot/statuses/09a773048943ad86b11a37c04c915baa7d1e9927","head":{"label":"byrney:master","ref":"master","sha":"09a773048943ad86b11a37c04c915baa7d1e9927","user":{"login":"byrney","id":6205096,"avatar_url":"https://avatars.githubusercontent.com/u/6205096?v=3","gravatar_id":"","url":"https://api.github.com/users/byrney","html_url":"https://github.com/byrney","followers_url":"https://api.github.com/users/byrney/followers","following_url":"https://api.github.com/users/byrney/following{/other_user}","gists_url":"https://api.github.com/users/byrney/gists{/gist_id}","starred_url":"https://api.github.com/users/byrney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byrney/subscriptions","organizations_url":"https://api.github.com/users/byrney/orgs","repos_url":"https://api.github.com/users/byrney/repos","events_url":"https://api.github.com/users/byrney/events{/privacy}","received_events_url":"https://api.github.com/users/byrney/received_events","type":"User","site_admin":false},"repo":{"id":42732210,"name":"telebot","full_name":"byrney/telebot","owner":{"login":"byrney","id":6205096,"avatar_url":"https://avatars.githubusercontent.com/u/6205096?v=3","gravatar_id":"","url":"https://api.github.com/users/byrney","html_url":"https://github.com/byrney","followers_url":"https://api.github.com/users/byrney/followers","following_url":"https://api.github.com/users/byrney/following{/other_user}","gists_url":"https://api.github.com/users/byrney/gists{/gist_id}","starred_url":"https://api.github.com/users/byrney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byrney/subscriptions","organizations_url":"https://api.github.com/users/byrney/orgs","repos_url":"https://api.github.com/users/byrney/repos","events_url":"https://api.github.com/users/byrney/events{/privacy}","received_events_url":"https://api.github.com/users/byrney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/byrney/telebot","description":"Ruby client for Telegram bot API","fork":true,"url":"https://api.github.com/repos/byrney/telebot","forks_url":"https://api.github.com/repos/byrney/telebot/forks","keys_url":"https://api.github.com/repos/byrney/telebot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/byrney/telebot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/byrney/telebot/teams","hooks_url":"https://api.github.com/repos/byrney/telebot/hooks","issue_events_url":"https://api.github.com/repos/byrney/telebot/issues/events{/number}","events_url":"https://api.github.com/repos/byrney/telebot/events","assignees_url":"https://api.github.com/repos/byrney/telebot/assignees{/user}","branches_url":"https://api.github.com/repos/byrney/telebot/branches{/branch}","tags_url":"https://api.github.com/repos/byrney/telebot/tags","blobs_url":"https://api.github.com/repos/byrney/telebot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/byrney/telebot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/byrney/telebot/git/refs{/sha}","trees_url":"https://api.github.com/repos/byrney/telebot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/byrney/telebot/statuses/{sha}","languages_url":"https://api.github.com/repos/byrney/telebot/languages","stargazers_url":"https://api.github.com/repos/byrney/telebot/stargazers","contributors_url":"https://api.github.com/repos/byrney/telebot/contributors","subscribers_url":"https://api.github.com/repos/byrney/telebot/subscribers","subscription_url":"https://api.github.com/repos/byrney/telebot/subscription","commits_url":"https://api.github.com/repos/byrney/telebot/commits{/sha}","git_commits_url":"https://api.github.com/repos/byrney/telebot/git/commits{/sha}","comments_url":"https://api.github.com/repos/byrney/telebot/comments{/number}","issue_comment_url":"https://api.github.com/repos/byrney/telebot/issues/comments{/number}","contents_url":"https://api.github.com/repos/byrney/telebot/contents/{+path}","compare_url":"https://api.github.com/repos/byrney/telebot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/byrney/telebot/merges","archive_url":"https://api.github.com/repos/byrney/telebot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/byrney/telebot/downloads","issues_url":"https://api.github.com/repos/byrney/telebot/issues{/number}","pulls_url":"https://api.github.com/repos/byrney/telebot/pulls{/number}","milestones_url":"https://api.github.com/repos/byrney/telebot/milestones{/number}","notifications_url":"https://api.github.com/repos/byrney/telebot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/byrney/telebot/labels{/name}","releases_url":"https://api.github.com/repos/byrney/telebot/releases{/id}","created_at":"2015-09-18T16:00:06Z","updated_at":"2015-09-18T16:00:07Z","pushed_at":"2015-09-18T16:18:04Z","git_url":"git://github.com/byrney/telebot.git","ssh_url":"git@github.com:byrney/telebot.git","clone_url":"https://github.com/byrney/telebot.git","svn_url":"https://github.com/byrney/telebot","homepage":null,"size":304,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"greyblake:master","ref":"master","sha":"2bfaddaf6adf6787d20aad8af83c4a2832d1fe83","user":{"login":"greyblake","id":113512,"avatar_url":"https://avatars.githubusercontent.com/u/113512?v=3","gravatar_id":"","url":"https://api.github.com/users/greyblake","html_url":"https://github.com/greyblake","followers_url":"https://api.github.com/users/greyblake/followers","following_url":"https://api.github.com/users/greyblake/following{/other_user}","gists_url":"https://api.github.com/users/greyblake/gists{/gist_id}","starred_url":"https://api.github.com/users/greyblake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greyblake/subscriptions","organizations_url":"https://api.github.com/users/greyblake/orgs","repos_url":"https://api.github.com/users/greyblake/repos","events_url":"https://api.github.com/users/greyblake/events{/privacy}","received_events_url":"https://api.github.com/users/greyblake/received_events","type":"User","site_admin":false},"repo":{"id":39744916,"name":"telebot","full_name":"greyblake/telebot","owner":{"login":"greyblake","id":113512,"avatar_url":"https://avatars.githubusercontent.com/u/113512?v=3","gravatar_id":"","url":"https://api.github.com/users/greyblake","html_url":"https://github.com/greyblake","followers_url":"https://api.github.com/users/greyblake/followers","following_url":"https://api.github.com/users/greyblake/following{/other_user}","gists_url":"https://api.github.com/users/greyblake/gists{/gist_id}","starred_url":"https://api.github.com/users/greyblake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greyblake/subscriptions","organizations_url":"https://api.github.com/users/greyblake/orgs","repos_url":"https://api.github.com/users/greyblake/repos","events_url":"https://api.github.com/users/greyblake/events{/privacy}","received_events_url":"https://api.github.com/users/greyblake/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/greyblake/telebot","description":"Ruby client for Telegram bot API","fork":false,"url":"https://api.github.com/repos/greyblake/telebot","forks_url":"https://api.github.com/repos/greyblake/telebot/forks","keys_url":"https://api.github.com/repos/greyblake/telebot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greyblake/telebot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greyblake/telebot/teams","hooks_url":"https://api.github.com/repos/greyblake/telebot/hooks","issue_events_url":"https://api.github.com/repos/greyblake/telebot/issues/events{/number}","events_url":"https://api.github.com/repos/greyblake/telebot/events","assignees_url":"https://api.github.com/repos/greyblake/telebot/assignees{/user}","branches_url":"https://api.github.com/repos/greyblake/telebot/branches{/branch}","tags_url":"https://api.github.com/repos/greyblake/telebot/tags","blobs_url":"https://api.github.com/repos/greyblake/telebot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greyblake/telebot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greyblake/telebot/git/refs{/sha}","trees_url":"https://api.github.com/repos/greyblake/telebot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greyblake/telebot/statuses/{sha}","languages_url":"https://api.github.com/repos/greyblake/telebot/languages","stargazers_url":"https://api.github.com/repos/greyblake/telebot/stargazers","contributors_url":"https://api.github.com/repos/greyblake/telebot/contributors","subscribers_url":"https://api.github.com/repos/greyblake/telebot/subscribers","subscription_url":"https://api.github.com/repos/greyblake/telebot/subscription","commits_url":"https://api.github.com/repos/greyblake/telebot/commits{/sha}","git_commits_url":"https://api.github.com/repos/greyblake/telebot/git/commits{/sha}","comments_url":"https://api.github.com/repos/greyblake/telebot/comments{/number}","issue_comment_url":"https://api.github.com/repos/greyblake/telebot/issues/comments{/number}","contents_url":"https://api.github.com/repos/greyblake/telebot/contents/{+path}","compare_url":"https://api.github.com/repos/greyblake/telebot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greyblake/telebot/merges","archive_url":"https://api.github.com/repos/greyblake/telebot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greyblake/telebot/downloads","issues_url":"https://api.github.com/repos/greyblake/telebot/issues{/number}","pulls_url":"https://api.github.com/repos/greyblake/telebot/pulls{/number}","milestones_url":"https://api.github.com/repos/greyblake/telebot/milestones{/number}","notifications_url":"https://api.github.com/repos/greyblake/telebot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greyblake/telebot/labels{/name}","releases_url":"https://api.github.com/repos/greyblake/telebot/releases{/id}","created_at":"2015-07-26T22:42:00Z","updated_at":"2015-09-13T19:23:24Z","pushed_at":"2015-09-08T13:51:13Z","git_url":"git://github.com/greyblake/telebot.git","ssh_url":"git@github.com:greyblake/telebot.git","clone_url":"https://github.com/greyblake/telebot.git","svn_url":"https://github.com/greyblake/telebot","homepage":null,"size":304,"stargazers_count":11,"watchers_count":11,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greyblake/telebot/pulls/1"},"html":{"href":"https://github.com/greyblake/telebot/pull/1"},"issue":{"href":"https://api.github.com/repos/greyblake/telebot/issues/1"},"comments":{"href":"https://api.github.com/repos/greyblake/telebot/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/greyblake/telebot/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/greyblake/telebot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greyblake/telebot/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/greyblake/telebot/statuses/09a773048943ad86b11a37c04c915baa7d1e9927"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":1,"changed_files":1}}