{"action":"created","issue":{"url":"https://api.github.com/repos/posativ/isso/issues/443","repository_url":"https://api.github.com/repos/posativ/isso","labels_url":"https://api.github.com/repos/posativ/isso/issues/443/labels{/name}","comments_url":"https://api.github.com/repos/posativ/isso/issues/443/comments","events_url":"https://api.github.com/repos/posativ/isso/issues/443/events","html_url":"https://github.com/posativ/isso/pull/443","id":322580714,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg3NjYxOTY4","number":443,"title":"Reply notification","user":{"login":"pellenilsson","id":8751300,"node_id":"MDQ6VXNlcjg3NTEzMDA=","avatar_url":"https://avatars3.githubusercontent.com/u/8751300?v=4","gravatar_id":"","url":"https://api.github.com/users/pellenilsson","html_url":"https://github.com/pellenilsson","followers_url":"https://api.github.com/users/pellenilsson/followers","following_url":"https://api.github.com/users/pellenilsson/following{/other_user}","gists_url":"https://api.github.com/users/pellenilsson/gists{/gist_id}","starred_url":"https://api.github.com/users/pellenilsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pellenilsson/subscriptions","organizations_url":"https://api.github.com/users/pellenilsson/orgs","repos_url":"https://api.github.com/users/pellenilsson/repos","events_url":"https://api.github.com/users/pellenilsson/events{/privacy}","received_events_url":"https://api.github.com/users/pellenilsson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-13T10:04:08Z","updated_at":"2018-07-17T04:42:18Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/posativ/isso/pulls/443","html_url":"https://github.com/posativ/isso/pull/443","diff_url":"https://github.com/posativ/isso/pull/443.diff","patch_url":"https://github.com/posativ/isso/pull/443.patch"},"body":"This PR introduces possibility for posters to get email notifications when people reply to their posts. It is based on work done by @tsileo in 2013(!), and additions I made this year. The original PR was #50.\r\n\r\nWhen posting a message, there is a checkbox labelled \"Subscribe to email notification of replies\". Checking that checkbox will set the `notification` flag in the database for that post. Any replies made to the post will cause an email to be sent to the author of the first post.\r\n\r\nIf you click the checkbox when making a **reply**, you will get notifications for all further replies to the same parent post, so you are basically subscribing to updates to that conversation thread.\r\n\r\nEach email will contain an unsubscribe link for **opt-out**. Clicking that will unsubscribe you from notifications for that conversation thread.\r\n\r\nThis PR also contains a fix for #395 which was triggered (or worsened) by this functionality.\r\n\r\nThis PR is however broken for many setups because of #420, so a fix for that issue is crucial.\r\n"},"comment":{"url":"https://api.github.com/repos/posativ/isso/issues/comments/405457585","html_url":"https://github.com/posativ/isso/pull/443#issuecomment-405457585","issue_url":"https://api.github.com/repos/posativ/isso/issues/443","id":405457585,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTQ1NzU4NQ==","user":{"login":"craigphicks","id":13205732,"node_id":"MDQ6VXNlcjEzMjA1NzMy","avatar_url":"https://avatars3.githubusercontent.com/u/13205732?v=4","gravatar_id":"","url":"https://api.github.com/users/craigphicks","html_url":"https://github.com/craigphicks","followers_url":"https://api.github.com/users/craigphicks/followers","following_url":"https://api.github.com/users/craigphicks/following{/other_user}","gists_url":"https://api.github.com/users/craigphicks/gists{/gist_id}","starred_url":"https://api.github.com/users/craigphicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigphicks/subscriptions","organizations_url":"https://api.github.com/users/craigphicks/orgs","repos_url":"https://api.github.com/users/craigphicks/repos","events_url":"https://api.github.com/users/craigphicks/events{/privacy}","received_events_url":"https://api.github.com/users/craigphicks/received_events","type":"User","site_admin":false},"created_at":"2018-07-17T04:42:18Z","updated_at":"2018-07-17T04:42:18Z","author_association":"NONE","body":"I fetched your branch\r\n\r\n    git fetch git@github.com:pellenilsson/isso.git reply_notification_dbfix:reno-dbfix\r\n    git checkout reno-dbfix\r\n\r\nBacked up the old database\r\n\r\n    cp /var/lib/isso/comments.db /var/lib/isso/comments.pre-update.db\r\n\r\nRan the branch code \r\n\r\n    python -m pdb ./bin/isso -c /etc/isso.cfg run\r\n\r\nUnlike with the *reply_notification* branch,  with the *reply_notification_dbfix* there is no error on initial display of messages.\r\n\r\nHowever, when adding a *new* comment *isso* returns 500 and the new comment is not displayed. The pre-exisitng  messages, which are presumably read from the successfully updated db, are displayed normally.\r\n\r\nChecking the *isso* log file shows this diagnostic information:\r\n\r\n\r\nconnected to SMTP server\r\nconnected to https://example.net/\r\nPOST /new\r\nTraceback (most recent call last):\r\n  File \"/home/user/work/isso-positiv/isso/__init__.py\", line 138, in dispatch\r\n    response = handler(request.environ, request, **values)\r\n  File \"/home/user/work/isso-positiv/isso/views/comments.py\", line 92, in dec\r\n    return func(self, env, req, *args, **kwargs)\r\n  File \"/home/user/work/isso-positiv/isso/views/__init__.py\", line 46, in dec\r\n    return func(cls, env, req, *args, **kwargs)\r\n  File \"/home/user/work/isso-positiv/isso/views/comments.py\", line 296, in new\r\n    rv = self.comments.add(uri, data)\r\n  File \"/home/user/work/isso-positiv/isso/db/comments.py\", line 68, in add\r\n    uri)\r\n  File \"/home/user/work/isso-positiv/isso/db/__init__.py\", line 62, in execute\r\n    return con.execute(sql, args)\r\nsqlite3.IntegrityError: NOT NULL constraint failed: comments.notification\r\n< repeated for every new message attempt>\r\n\r\nRestarting several times and the behavior is always the same.\r\n"}}
{"actor":{"display_login":"craigphicks"}}