{"action":"created","comment":{"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/comments/37360608","id":37360608,"diff_hunk":"@@ -275,3 +275,39 @@ def get_followers(self):\n             return None\n         else:\n             return proto[0]\n+\n+class MessageStore(object):\n+    def __init__(self):\n+        self.db = lite.connect(DATABASE)\n+        self.db.text_factory = str\n+        try:\n+            cursor = self.db.cursor()\n+            cursor.execute('''CREATE TABLE messages(guid BLOB , signed_pubkey BLOB,\n+encryption_pubkey BLOB, subject TEXT, message_type TEXT, message TEXT, timestamp, INTEGER, signature BLOB)''')\n+            cursor.execute('''CREATE INDEX idx1 ON messages(guid);''')\n+            self.db.commit()\n+        except Exception:\n+            pass","path":"db/datastore.py","position":16,"original_position":16,"commit_id":"eadc700fc4876472f94c9afc111bb855dc602655","original_commit_id":"eadc700fc4876472f94c9afc111bb855dc602655","user":{"login":"gubatron","id":163977,"avatar_url":"https://avatars.githubusercontent.com/u/163977?v=3","gravatar_id":"","url":"https://api.github.com/users/gubatron","html_url":"https://github.com/gubatron","followers_url":"https://api.github.com/users/gubatron/followers","following_url":"https://api.github.com/users/gubatron/following{/other_user}","gists_url":"https://api.github.com/users/gubatron/gists{/gist_id}","starred_url":"https://api.github.com/users/gubatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gubatron/subscriptions","organizations_url":"https://api.github.com/users/gubatron/orgs","repos_url":"https://api.github.com/users/gubatron/repos","events_url":"https://api.github.com/users/gubatron/events{/privacy}","received_events_url":"https://api.github.com/users/gubatron/received_events","type":"User","site_admin":false},"body":"perhaps keeping a state here on which you know that the table couldn't be created might help.","created_at":"2015-08-18T22:15:59Z","updated_at":"2015-08-18T22:15:59Z","html_url":"https://github.com/OpenBazaar/OpenBazaar-Server/pull/20#discussion_r37360608","pull_request_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/comments/37360608"},"html":{"href":"https://github.com/OpenBazaar/OpenBazaar-Server/pull/20#discussion_r37360608"},"pull_request":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20","id":42720417,"html_url":"https://github.com/OpenBazaar/OpenBazaar-Server/pull/20","diff_url":"https://github.com/OpenBazaar/OpenBazaar-Server/pull/20.diff","patch_url":"https://github.com/OpenBazaar/OpenBazaar-Server/pull/20.patch","issue_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/20","number":20,"state":"open","locked":false,"title":"[WIP] Handle messages and notifications","user":{"login":"cpacia","id":4504708,"avatar_url":"https://avatars.githubusercontent.com/u/4504708?v=3","gravatar_id":"","url":"https://api.github.com/users/cpacia","html_url":"https://github.com/cpacia","followers_url":"https://api.github.com/users/cpacia/followers","following_url":"https://api.github.com/users/cpacia/following{/other_user}","gists_url":"https://api.github.com/users/cpacia/gists{/gist_id}","starred_url":"https://api.github.com/users/cpacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpacia/subscriptions","organizations_url":"https://api.github.com/users/cpacia/orgs","repos_url":"https://api.github.com/users/cpacia/repos","events_url":"https://api.github.com/users/cpacia/events{/privacy}","received_events_url":"https://api.github.com/users/cpacia/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-18T16:38:11Z","updated_at":"2015-08-18T22:15:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecd535905076f5165d3d52ad14850679da3c06ed","assignee":{"login":"hoffmabc","id":45482,"avatar_url":"https://avatars.githubusercontent.com/u/45482?v=3","gravatar_id":"","url":"https://api.github.com/users/hoffmabc","html_url":"https://github.com/hoffmabc","followers_url":"https://api.github.com/users/hoffmabc/followers","following_url":"https://api.github.com/users/hoffmabc/following{/other_user}","gists_url":"https://api.github.com/users/hoffmabc/gists{/gist_id}","starred_url":"https://api.github.com/users/hoffmabc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoffmabc/subscriptions","organizations_url":"https://api.github.com/users/hoffmabc/orgs","repos_url":"https://api.github.com/users/hoffmabc/repos","events_url":"https://api.github.com/users/hoffmabc/events{/privacy}","received_events_url":"https://api.github.com/users/hoffmabc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20/commits","review_comments_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20/comments","review_comment_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/20/comments","statuses_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/statuses/eadc700fc4876472f94c9afc111bb855dc602655","head":{"label":"cpacia:master","ref":"master","sha":"eadc700fc4876472f94c9afc111bb855dc602655","user":{"login":"cpacia","id":4504708,"avatar_url":"https://avatars.githubusercontent.com/u/4504708?v=3","gravatar_id":"","url":"https://api.github.com/users/cpacia","html_url":"https://github.com/cpacia","followers_url":"https://api.github.com/users/cpacia/followers","following_url":"https://api.github.com/users/cpacia/following{/other_user}","gists_url":"https://api.github.com/users/cpacia/gists{/gist_id}","starred_url":"https://api.github.com/users/cpacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpacia/subscriptions","organizations_url":"https://api.github.com/users/cpacia/orgs","repos_url":"https://api.github.com/users/cpacia/repos","events_url":"https://api.github.com/users/cpacia/events{/privacy}","received_events_url":"https://api.github.com/users/cpacia/received_events","type":"User","site_admin":false},"repo":{"id":40669723,"name":"OpenBazaar-Server","full_name":"cpacia/OpenBazaar-Server","owner":{"login":"cpacia","id":4504708,"avatar_url":"https://avatars.githubusercontent.com/u/4504708?v=3","gravatar_id":"","url":"https://api.github.com/users/cpacia","html_url":"https://github.com/cpacia","followers_url":"https://api.github.com/users/cpacia/followers","following_url":"https://api.github.com/users/cpacia/following{/other_user}","gists_url":"https://api.github.com/users/cpacia/gists{/gist_id}","starred_url":"https://api.github.com/users/cpacia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpacia/subscriptions","organizations_url":"https://api.github.com/users/cpacia/orgs","repos_url":"https://api.github.com/users/cpacia/repos","events_url":"https://api.github.com/users/cpacia/events{/privacy}","received_events_url":"https://api.github.com/users/cpacia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cpacia/OpenBazaar-Server","description":"Packages for the network upgrade","fork":true,"url":"https://api.github.com/repos/cpacia/OpenBazaar-Server","forks_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/forks","keys_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/teams","hooks_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/hooks","issue_events_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/issues/events{/number}","events_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/events","assignees_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/assignees{/user}","branches_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/branches{/branch}","tags_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/tags","blobs_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/statuses/{sha}","languages_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/languages","stargazers_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/stargazers","contributors_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/contributors","subscribers_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/subscribers","subscription_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/subscription","commits_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/contents/{+path}","compare_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/merges","archive_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/downloads","issues_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/issues{/number}","pulls_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/pulls{/number}","milestones_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/milestones{/number}","notifications_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/labels{/name}","releases_url":"https://api.github.com/repos/cpacia/OpenBazaar-Server/releases{/id}","created_at":"2015-08-13T16:30:39Z","updated_at":"2015-08-17T14:46:56Z","pushed_at":"2015-08-18T16:35:48Z","git_url":"git://github.com/cpacia/OpenBazaar-Server.git","ssh_url":"git@github.com:cpacia/OpenBazaar-Server.git","clone_url":"https://github.com/cpacia/OpenBazaar-Server.git","svn_url":"https://github.com/cpacia/OpenBazaar-Server","homepage":null,"size":610,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"OpenBazaar:master","ref":"master","sha":"c12b1b602ef70c4efe1a38ff649a0f48f24965dc","user":{"login":"OpenBazaar","id":7438770,"avatar_url":"https://avatars.githubusercontent.com/u/7438770?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":37530297,"name":"OpenBazaar-Server","full_name":"OpenBazaar/OpenBazaar-Server","owner":{"login":"OpenBazaar","id":7438770,"avatar_url":"https://avatars.githubusercontent.com/u/7438770?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenBazaar/OpenBazaar-Server","description":"Server daemon for communication between client and OpenBazaar network","fork":false,"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server","forks_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/forks","keys_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/teams","hooks_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/hooks","issue_events_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/events{/number}","events_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/events","assignees_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/assignees{/user}","branches_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/branches{/branch}","tags_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/tags","blobs_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/languages","stargazers_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/stargazers","contributors_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/contributors","subscribers_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/subscribers","subscription_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/subscription","commits_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/contents/{+path}","compare_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/merges","archive_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/downloads","issues_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues{/number}","pulls_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/labels{/name}","releases_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/releases{/id}","created_at":"2015-06-16T13:02:04Z","updated_at":"2015-08-18T14:15:35Z","pushed_at":"2015-08-18T21:13:20Z","git_url":"git://github.com/OpenBazaar/OpenBazaar-Server.git","ssh_url":"git@github.com:OpenBazaar/OpenBazaar-Server.git","clone_url":"https://github.com/OpenBazaar/OpenBazaar-Server.git","svn_url":"https://github.com/OpenBazaar/OpenBazaar-Server","homepage":"","size":1071,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":7,"forks":5,"open_issues":7,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20"},"html":{"href":"https://github.com/OpenBazaar/OpenBazaar-Server/pull/20"},"issue":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/20"},"comments":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar-Server/statuses/eadc700fc4876472f94c9afc111bb855dc602655"}}}}