{"action":"created","comment":{"url":"https://api.github.com/repos/astroidmail/astroid/pulls/comments/174076436","pull_request_review_id":103366286,"id":174076436,"diff_hunk":"@@ -666,7 +668,56 @@ namespace Astroid {\n   }\n \n   bool EditMessage::set_from (Account * a) {\n-    generate_mid_from_account(a);\n+    if (draft_msg) {\n+      LOG(debug) << \"em: set_from called for saved draft\";\n+       if (a != accounts->get_account_for_address (draft_msg->sender)) {\n+         LOG(debug) << \"em: set_from called for saved draft with different account\";\n+\n+         ustring fname = draft_msg->fname;\n+         path fpath = path(fname.c_str ());\n+         if (is_regular_file (fpath)) {\n+           boost::filesystem::remove (fpath);\n+            ComposeMessage * cmsg = make_draft_message ();","path":"src/modes/edit_message.cc","position":156,"original_position":80,"commit_id":"5187f8db9f62d0d86e5e520f2ad58c528aa89a93","original_commit_id":"5187f8db9f62d0d86e5e520f2ad58c528aa89a93","user":{"login":"gauteh","id":56827,"avatar_url":"https://avatars2.githubusercontent.com/u/56827?v=4","gravatar_id":"","url":"https://api.github.com/users/gauteh","html_url":"https://github.com/gauteh","followers_url":"https://api.github.com/users/gauteh/followers","following_url":"https://api.github.com/users/gauteh/following{/other_user}","gists_url":"https://api.github.com/users/gauteh/gists{/gist_id}","starred_url":"https://api.github.com/users/gauteh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauteh/subscriptions","organizations_url":"https://api.github.com/users/gauteh/orgs","repos_url":"https://api.github.com/users/gauteh/repos","events_url":"https://api.github.com/users/gauteh/events{/privacy}","received_events_url":"https://api.github.com/users/gauteh/received_events","type":"User","site_admin":false},"body":"This accesses and modifies the database. The appropriate locks must be acquired first, and make sure that no dead-locks can occur.","created_at":"2018-03-13T10:17:09Z","updated_at":"2018-03-13T10:17:09Z","html_url":"https://github.com/astroidmail/astroid/pull/438#discussion_r174076436","pull_request_url":"https://api.github.com/repos/astroidmail/astroid/pulls/438","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/astroidmail/astroid/pulls/comments/174076436"},"html":{"href":"https://github.com/astroidmail/astroid/pull/438#discussion_r174076436"},"pull_request":{"href":"https://api.github.com/repos/astroidmail/astroid/pulls/438"}}},"pull_request":{"url":"https://api.github.com/repos/astroidmail/astroid/pulls/438","id":153451072,"html_url":"https://github.com/astroidmail/astroid/pull/438","diff_url":"https://github.com/astroidmail/astroid/pull/438.diff","patch_url":"https://github.com/astroidmail/astroid/pull/438.patch","issue_url":"https://api.github.com/repos/astroidmail/astroid/issues/438","number":438,"state":"open","locked":false,"title":"Message ID Generation Enhancements","user":{"login":"c-alpha","id":2213269,"avatar_url":"https://avatars2.githubusercontent.com/u/2213269?v=4","gravatar_id":"","url":"https://api.github.com/users/c-alpha","html_url":"https://github.com/c-alpha","followers_url":"https://api.github.com/users/c-alpha/followers","following_url":"https://api.github.com/users/c-alpha/following{/other_user}","gists_url":"https://api.github.com/users/c-alpha/gists{/gist_id}","starred_url":"https://api.github.com/users/c-alpha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-alpha/subscriptions","organizations_url":"https://api.github.com/users/c-alpha/orgs","repos_url":"https://api.github.com/users/c-alpha/repos","events_url":"https://api.github.com/users/c-alpha/events{/privacy}","received_events_url":"https://api.github.com/users/c-alpha/received_events","type":"User","site_admin":false},"body":"This new feature allows users to have different style message ids on each account (thus reducing social traceability of users). Whenever the \"from\" account of a draft message is changed, a new message id is generated according to the new account's settings.\r\n\r\nInstead of being global parameters, `mail.message_id_user` and `mail.message_id_fqdn` are now per-account parameters. Consequently, the version of the configuration file format had to be bumped up to 10, and pre-10 global values of `mail.message_id_user` and `mail.message_id_fqdn` are removed, and their values copied to all configured accounts (i.e. no change in behaviour).\r\n\r\nIf the `mail.message_id_user` configuration file parameter is empty, now nothing is inserted. Previously, `.astroid` was forcibly inserted. To retain the same factory default behaviour, the default config file template has been updated to set this parameter to `astroid`. The `.` is still forcibly inserted if `mail.message_id_user` is not empty to retain compatibility with existing configurations.\r\n\r\nThe generation of the random part has been updated to use the full set of allowed characters as per RFC 5322 to increase entropy and reduce risk of collisions. As a consequence, the message id can no longer be used as a file name for temp files. Hence, the generation of temp file names has been decoupled from the message id generation. Previously, external editors could recognize astroid temp files as email messages from the `@<fqdn>` naming convention (as the message id was used as the file name). To retain this scheme, a new config variable `editor.external_tmpfile_suffix` was introduced, with a default value of `.eml`. **This may break compatibility with existing configurations** since the auto-detection in an external editor's configuration will likely need to be updated to recognize the new naming convention. ","created_at":"2017-11-18T13:56:53Z","updated_at":"2018-03-13T10:17:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b52788a0945e7c5b6f85c22ef58276bdcaa5bfcf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/astroidmail/astroid/pulls/438/commits","review_comments_url":"https://api.github.com/repos/astroidmail/astroid/pulls/438/comments","review_comment_url":"https://api.github.com/repos/astroidmail/astroid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astroidmail/astroid/issues/438/comments","statuses_url":"https://api.github.com/repos/astroidmail/astroid/statuses/5187f8db9f62d0d86e5e520f2ad58c528aa89a93","head":{"label":"c-alpha:message-id","ref":"message-id","sha":"5187f8db9f62d0d86e5e520f2ad58c528aa89a93","user":{"login":"c-alpha","id":2213269,"avatar_url":"https://avatars2.githubusercontent.com/u/2213269?v=4","gravatar_id":"","url":"https://api.github.com/users/c-alpha","html_url":"https://github.com/c-alpha","followers_url":"https://api.github.com/users/c-alpha/followers","following_url":"https://api.github.com/users/c-alpha/following{/other_user}","gists_url":"https://api.github.com/users/c-alpha/gists{/gist_id}","starred_url":"https://api.github.com/users/c-alpha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-alpha/subscriptions","organizations_url":"https://api.github.com/users/c-alpha/orgs","repos_url":"https://api.github.com/users/c-alpha/repos","events_url":"https://api.github.com/users/c-alpha/events{/privacy}","received_events_url":"https://api.github.com/users/c-alpha/received_events","type":"User","site_admin":false},"repo":{"id":105674634,"name":"astroid","full_name":"c-alpha/astroid","owner":{"login":"c-alpha","id":2213269,"avatar_url":"https://avatars2.githubusercontent.com/u/2213269?v=4","gravatar_id":"","url":"https://api.github.com/users/c-alpha","html_url":"https://github.com/c-alpha","followers_url":"https://api.github.com/users/c-alpha/followers","following_url":"https://api.github.com/users/c-alpha/following{/other_user}","gists_url":"https://api.github.com/users/c-alpha/gists{/gist_id}","starred_url":"https://api.github.com/users/c-alpha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-alpha/subscriptions","organizations_url":"https://api.github.com/users/c-alpha/orgs","repos_url":"https://api.github.com/users/c-alpha/repos","events_url":"https://api.github.com/users/c-alpha/events{/privacy}","received_events_url":"https://api.github.com/users/c-alpha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/c-alpha/astroid","description":"a graphical threads-with-tags style, lightweight and fast, email client for notmuch, inspired by sup and others","fork":true,"url":"https://api.github.com/repos/c-alpha/astroid","forks_url":"https://api.github.com/repos/c-alpha/astroid/forks","keys_url":"https://api.github.com/repos/c-alpha/astroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c-alpha/astroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c-alpha/astroid/teams","hooks_url":"https://api.github.com/repos/c-alpha/astroid/hooks","issue_events_url":"https://api.github.com/repos/c-alpha/astroid/issues/events{/number}","events_url":"https://api.github.com/repos/c-alpha/astroid/events","assignees_url":"https://api.github.com/repos/c-alpha/astroid/assignees{/user}","branches_url":"https://api.github.com/repos/c-alpha/astroid/branches{/branch}","tags_url":"https://api.github.com/repos/c-alpha/astroid/tags","blobs_url":"https://api.github.com/repos/c-alpha/astroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c-alpha/astroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c-alpha/astroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/c-alpha/astroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c-alpha/astroid/statuses/{sha}","languages_url":"https://api.github.com/repos/c-alpha/astroid/languages","stargazers_url":"https://api.github.com/repos/c-alpha/astroid/stargazers","contributors_url":"https://api.github.com/repos/c-alpha/astroid/contributors","subscribers_url":"https://api.github.com/repos/c-alpha/astroid/subscribers","subscription_url":"https://api.github.com/repos/c-alpha/astroid/subscription","commits_url":"https://api.github.com/repos/c-alpha/astroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/c-alpha/astroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/c-alpha/astroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/c-alpha/astroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/c-alpha/astroid/contents/{+path}","compare_url":"https://api.github.com/repos/c-alpha/astroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c-alpha/astroid/merges","archive_url":"https://api.github.com/repos/c-alpha/astroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c-alpha/astroid/downloads","issues_url":"https://api.github.com/repos/c-alpha/astroid/issues{/number}","pulls_url":"https://api.github.com/repos/c-alpha/astroid/pulls{/number}","milestones_url":"https://api.github.com/repos/c-alpha/astroid/milestones{/number}","notifications_url":"https://api.github.com/repos/c-alpha/astroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c-alpha/astroid/labels{/name}","releases_url":"https://api.github.com/repos/c-alpha/astroid/releases{/id}","deployments_url":"https://api.github.com/repos/c-alpha/astroid/deployments","created_at":"2017-10-03T16:24:43Z","updated_at":"2017-10-19T12:20:49Z","pushed_at":"2018-03-12T22:39:22Z","git_url":"git://github.com/c-alpha/astroid.git","ssh_url":"git@github.com:c-alpha/astroid.git","clone_url":"https://github.com/c-alpha/astroid.git","svn_url":"https://github.com/c-alpha/astroid","homepage":"http://astroidmail.github.io","size":14044,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"astroidmail:master","ref":"master","sha":"ec9851436734ee34209b74da66c309cb6835a2f7","user":{"login":"astroidmail","id":19655966,"avatar_url":"https://avatars0.githubusercontent.com/u/19655966?v=4","gravatar_id":"","url":"https://api.github.com/users/astroidmail","html_url":"https://github.com/astroidmail","followers_url":"https://api.github.com/users/astroidmail/followers","following_url":"https://api.github.com/users/astroidmail/following{/other_user}","gists_url":"https://api.github.com/users/astroidmail/gists{/gist_id}","starred_url":"https://api.github.com/users/astroidmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astroidmail/subscriptions","organizations_url":"https://api.github.com/users/astroidmail/orgs","repos_url":"https://api.github.com/users/astroidmail/repos","events_url":"https://api.github.com/users/astroidmail/events{/privacy}","received_events_url":"https://api.github.com/users/astroidmail/received_events","type":"Organization","site_admin":false},"repo":{"id":17337103,"name":"astroid","full_name":"astroidmail/astroid","owner":{"login":"astroidmail","id":19655966,"avatar_url":"https://avatars0.githubusercontent.com/u/19655966?v=4","gravatar_id":"","url":"https://api.github.com/users/astroidmail","html_url":"https://github.com/astroidmail","followers_url":"https://api.github.com/users/astroidmail/followers","following_url":"https://api.github.com/users/astroidmail/following{/other_user}","gists_url":"https://api.github.com/users/astroidmail/gists{/gist_id}","starred_url":"https://api.github.com/users/astroidmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astroidmail/subscriptions","organizations_url":"https://api.github.com/users/astroidmail/orgs","repos_url":"https://api.github.com/users/astroidmail/repos","events_url":"https://api.github.com/users/astroidmail/events{/privacy}","received_events_url":"https://api.github.com/users/astroidmail/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astroidmail/astroid","description":"a graphical threads-with-tags style, lightweight and fast, email client for notmuch, inspired by sup and others","fork":false,"url":"https://api.github.com/repos/astroidmail/astroid","forks_url":"https://api.github.com/repos/astroidmail/astroid/forks","keys_url":"https://api.github.com/repos/astroidmail/astroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astroidmail/astroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astroidmail/astroid/teams","hooks_url":"https://api.github.com/repos/astroidmail/astroid/hooks","issue_events_url":"https://api.github.com/repos/astroidmail/astroid/issues/events{/number}","events_url":"https://api.github.com/repos/astroidmail/astroid/events","assignees_url":"https://api.github.com/repos/astroidmail/astroid/assignees{/user}","branches_url":"https://api.github.com/repos/astroidmail/astroid/branches{/branch}","tags_url":"https://api.github.com/repos/astroidmail/astroid/tags","blobs_url":"https://api.github.com/repos/astroidmail/astroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astroidmail/astroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astroidmail/astroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/astroidmail/astroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astroidmail/astroid/statuses/{sha}","languages_url":"https://api.github.com/repos/astroidmail/astroid/languages","stargazers_url":"https://api.github.com/repos/astroidmail/astroid/stargazers","contributors_url":"https://api.github.com/repos/astroidmail/astroid/contributors","subscribers_url":"https://api.github.com/repos/astroidmail/astroid/subscribers","subscription_url":"https://api.github.com/repos/astroidmail/astroid/subscription","commits_url":"https://api.github.com/repos/astroidmail/astroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/astroidmail/astroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/astroidmail/astroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/astroidmail/astroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/astroidmail/astroid/contents/{+path}","compare_url":"https://api.github.com/repos/astroidmail/astroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astroidmail/astroid/merges","archive_url":"https://api.github.com/repos/astroidmail/astroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astroidmail/astroid/downloads","issues_url":"https://api.github.com/repos/astroidmail/astroid/issues{/number}","pulls_url":"https://api.github.com/repos/astroidmail/astroid/pulls{/number}","milestones_url":"https://api.github.com/repos/astroidmail/astroid/milestones{/number}","notifications_url":"https://api.github.com/repos/astroidmail/astroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astroidmail/astroid/labels{/name}","releases_url":"https://api.github.com/repos/astroidmail/astroid/releases{/id}","deployments_url":"https://api.github.com/repos/astroidmail/astroid/deployments","created_at":"2014-03-02T12:19:14Z","updated_at":"2018-03-12T16:19:31Z","pushed_at":"2018-03-12T18:00:02Z","git_url":"git://github.com/astroidmail/astroid.git","ssh_url":"git@github.com:astroidmail/astroid.git","clone_url":"https://github.com/astroidmail/astroid.git","svn_url":"https://github.com/astroidmail/astroid","homepage":"http://astroidmail.github.io","size":14080,"stargazers_count":239,"watchers_count":239,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":79,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":33,"open_issues":79,"watchers":239,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astroidmail/astroid/pulls/438"},"html":{"href":"https://github.com/astroidmail/astroid/pull/438"},"issue":{"href":"https://api.github.com/repos/astroidmail/astroid/issues/438"},"comments":{"href":"https://api.github.com/repos/astroidmail/astroid/issues/438/comments"},"review_comments":{"href":"https://api.github.com/repos/astroidmail/astroid/pulls/438/comments"},"review_comment":{"href":"https://api.github.com/repos/astroidmail/astroid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astroidmail/astroid/pulls/438/commits"},"statuses":{"href":"https://api.github.com/repos/astroidmail/astroid/statuses/5187f8db9f62d0d86e5e520f2ad58c528aa89a93"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gauteh"}}