{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/social/pulls/comments/192664100","pull_request_review_id":125479588,"id":192664100,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjY2NDEwMA==","diff_hunk":"@@ -2,76 +2,122 @@\n  * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n  */\n \n-\"use strict\";\n-openerp.mail_forward = function (instance) {\n-    var _t = instance.web._t;\n-    instance.mail.ThreadMessage.include({\n-        bind_events: function () {\n-            this._super.apply(this, arguments);\n-            this.$('.oe_forward').on('click', this.on_message_forward);\n-        },\n+odoo.define('mail_forward.forward', function (require) {\n+    \"use strict\";\n+    var core = require('web.core');\n+    var ChatThread = require('mail.ChatThread');\n+    var chat_manager = require('mail.chat_manager');\n+    var Model = require('web.Model');\n+    var session = require('web.session');\n+    var MessageModel = new Model('mail.message', session.user_context);\n+    var _t = core._t;\n \n-        on_message_forward: function () {\n+    ChatThread.include({\n+        on_message_forward: function (message_id) {\n+            var self = this;\n+            var read_fields = ['record_name', 'parent_id', 'subject', 'attachment_ids', 'date',\n+                'email_to', 'email_from', 'email_cc', 'model', 'res_id', 'body'];\n             // Generate email subject as possible from record_name and subject\n-            var subject = [_t(\"FWD\")];\n-            if (this.record_name && (this.show_record_name ||\n-                                     this.parent_id))\n-            {\n-                subject.push(this.record_name);\n-            }\n-            if (this.subject) {\n-                subject.push(this.subject);\n-            } else if (subject.length < 2) {\n-                subject.push(_t(\"(No subject)\"));\n-            }\n+            MessageModel.call('read', [message_id, read_fields], {context: session.user_context}).then(function (result) {","path":"mail_forward/static/src/js/mail_forward.js","position":null,"original_position":40,"commit_id":"4ff4dc16cd647ef7e337479357b9645172fb1a3e","original_commit_id":"4ff4dc16cd647ef7e337479357b9645172fb1a3e","user":{"login":"ecino","id":8435180,"node_id":"MDQ6VXNlcjg0MzUxODA=","avatar_url":"https://avatars0.githubusercontent.com/u/8435180?v=4","gravatar_id":"","url":"https://api.github.com/users/ecino","html_url":"https://github.com/ecino","followers_url":"https://api.github.com/users/ecino/followers","following_url":"https://api.github.com/users/ecino/following{/other_user}","gists_url":"https://api.github.com/users/ecino/gists{/gist_id}","starred_url":"https://api.github.com/users/ecino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecino/subscriptions","organizations_url":"https://api.github.com/users/ecino/orgs","repos_url":"https://api.github.com/users/ecino/repos","events_url":"https://api.github.com/users/ecino/events{/privacy}","received_events_url":"https://api.github.com/users/ecino/received_events","type":"User","site_admin":false},"body":"Not sure what you mean by proxied method. I'm no javascript expert, I just ported the module to v10. ","created_at":"2018-06-04T08:38:20Z","updated_at":"2018-06-04T08:38:20Z","html_url":"https://github.com/OCA/social/pull/256#discussion_r192664100","pull_request_url":"https://api.github.com/repos/OCA/social/pulls/256","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OCA/social/pulls/comments/192664100"},"html":{"href":"https://github.com/OCA/social/pull/256#discussion_r192664100"},"pull_request":{"href":"https://api.github.com/repos/OCA/social/pulls/256"}},"in_reply_to_id":184612729},"pull_request":{"url":"https://api.github.com/repos/OCA/social/pulls/256","id":181215649,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgxMjE1NjQ5","html_url":"https://github.com/OCA/social/pull/256","diff_url":"https://github.com/OCA/social/pull/256.diff","patch_url":"https://github.com/OCA/social/pull/256.patch","issue_url":"https://api.github.com/repos/OCA/social/issues/256","number":256,"state":"open","locked":false,"title":"[10.0][MIG] migrate module mail_forward","user":{"login":"ecino","id":8435180,"node_id":"MDQ6VXNlcjg0MzUxODA=","avatar_url":"https://avatars0.githubusercontent.com/u/8435180?v=4","gravatar_id":"","url":"https://api.github.com/users/ecino","html_url":"https://github.com/ecino","followers_url":"https://api.github.com/users/ecino/followers","following_url":"https://api.github.com/users/ecino/following{/other_user}","gists_url":"https://api.github.com/users/ecino/gists{/gist_id}","starred_url":"https://api.github.com/users/ecino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecino/subscriptions","organizations_url":"https://api.github.com/users/ecino/orgs","repos_url":"https://api.github.com/users/ecino/repos","events_url":"https://api.github.com/users/ecino/events{/privacy}","received_events_url":"https://api.github.com/users/ecino/received_events","type":"User","site_admin":false},"body":"This takes the module mail_forward that was available in version 8.0 and updates it in order to work on version 10.0","created_at":"2018-04-12T14:09:02Z","updated_at":"2018-06-04T08:38:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80d63a946655f21824d9e62325293de102d861bc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":254402022,"node_id":"MDU6TGFiZWwyNTQ0MDIwMjI=","url":"https://api.github.com/repos/OCA/social/labels/needs%20review","name":"needs review","color":"fbca04","default":false}],"milestone":{"url":"https://api.github.com/repos/OCA/social/milestones/3","html_url":"https://github.com/OCA/social/milestone/3","labels_url":"https://api.github.com/repos/OCA/social/milestones/3/labels","id":2052386,"node_id":"MDk6TWlsZXN0b25lMjA1MjM4Ng==","number":3,"title":"10.0","description":null,"creator":{"login":"pedrobaeza","id":7165771,"node_id":"MDQ6VXNlcjcxNjU3NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/7165771?v=4","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":49,"state":"open","created_at":"2016-10-06T14:08:45Z","updated_at":"2018-05-16T11:06:07Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/social/pulls/256/commits","review_comments_url":"https://api.github.com/repos/OCA/social/pulls/256/comments","review_comment_url":"https://api.github.com/repos/OCA/social/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/social/issues/256/comments","statuses_url":"https://api.github.com/repos/OCA/social/statuses/4ff4dc16cd647ef7e337479357b9645172fb1a3e","head":{"label":"CompassionCH:10.0-mig-mail_forward","ref":"10.0-mig-mail_forward","sha":"4ff4dc16cd647ef7e337479357b9645172fb1a3e","user":{"login":"CompassionCH","id":8435213,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MzUyMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/8435213?v=4","gravatar_id":"","url":"https://api.github.com/users/CompassionCH","html_url":"https://github.com/CompassionCH","followers_url":"https://api.github.com/users/CompassionCH/followers","following_url":"https://api.github.com/users/CompassionCH/following{/other_user}","gists_url":"https://api.github.com/users/CompassionCH/gists{/gist_id}","starred_url":"https://api.github.com/users/CompassionCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CompassionCH/subscriptions","organizations_url":"https://api.github.com/users/CompassionCH/orgs","repos_url":"https://api.github.com/users/CompassionCH/repos","events_url":"https://api.github.com/users/CompassionCH/events{/privacy}","received_events_url":"https://api.github.com/users/CompassionCH/received_events","type":"Organization","site_admin":false},"repo":{"id":66465901,"node_id":"MDEwOlJlcG9zaXRvcnk2NjQ2NTkwMQ==","name":"social","full_name":"CompassionCH/social","owner":{"login":"CompassionCH","id":8435213,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MzUyMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/8435213?v=4","gravatar_id":"","url":"https://api.github.com/users/CompassionCH","html_url":"https://github.com/CompassionCH","followers_url":"https://api.github.com/users/CompassionCH/followers","following_url":"https://api.github.com/users/CompassionCH/following{/other_user}","gists_url":"https://api.github.com/users/CompassionCH/gists{/gist_id}","starred_url":"https://api.github.com/users/CompassionCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CompassionCH/subscriptions","organizations_url":"https://api.github.com/users/CompassionCH/orgs","repos_url":"https://api.github.com/users/CompassionCH/repos","events_url":"https://api.github.com/users/CompassionCH/events{/privacy}","received_events_url":"https://api.github.com/users/CompassionCH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CompassionCH/social","description":"Addons concerning odoo's social ERP features and messaging in general","fork":true,"url":"https://api.github.com/repos/CompassionCH/social","forks_url":"https://api.github.com/repos/CompassionCH/social/forks","keys_url":"https://api.github.com/repos/CompassionCH/social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CompassionCH/social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CompassionCH/social/teams","hooks_url":"https://api.github.com/repos/CompassionCH/social/hooks","issue_events_url":"https://api.github.com/repos/CompassionCH/social/issues/events{/number}","events_url":"https://api.github.com/repos/CompassionCH/social/events","assignees_url":"https://api.github.com/repos/CompassionCH/social/assignees{/user}","branches_url":"https://api.github.com/repos/CompassionCH/social/branches{/branch}","tags_url":"https://api.github.com/repos/CompassionCH/social/tags","blobs_url":"https://api.github.com/repos/CompassionCH/social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CompassionCH/social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CompassionCH/social/git/refs{/sha}","trees_url":"https://api.github.com/repos/CompassionCH/social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CompassionCH/social/statuses/{sha}","languages_url":"https://api.github.com/repos/CompassionCH/social/languages","stargazers_url":"https://api.github.com/repos/CompassionCH/social/stargazers","contributors_url":"https://api.github.com/repos/CompassionCH/social/contributors","subscribers_url":"https://api.github.com/repos/CompassionCH/social/subscribers","subscription_url":"https://api.github.com/repos/CompassionCH/social/subscription","commits_url":"https://api.github.com/repos/CompassionCH/social/commits{/sha}","git_commits_url":"https://api.github.com/repos/CompassionCH/social/git/commits{/sha}","comments_url":"https://api.github.com/repos/CompassionCH/social/comments{/number}","issue_comment_url":"https://api.github.com/repos/CompassionCH/social/issues/comments{/number}","contents_url":"https://api.github.com/repos/CompassionCH/social/contents/{+path}","compare_url":"https://api.github.com/repos/CompassionCH/social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CompassionCH/social/merges","archive_url":"https://api.github.com/repos/CompassionCH/social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CompassionCH/social/downloads","issues_url":"https://api.github.com/repos/CompassionCH/social/issues{/number}","pulls_url":"https://api.github.com/repos/CompassionCH/social/pulls{/number}","milestones_url":"https://api.github.com/repos/CompassionCH/social/milestones{/number}","notifications_url":"https://api.github.com/repos/CompassionCH/social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CompassionCH/social/labels{/name}","releases_url":"https://api.github.com/repos/CompassionCH/social/releases{/id}","deployments_url":"https://api.github.com/repos/CompassionCH/social/deployments","created_at":"2016-08-24T13:22:44Z","updated_at":"2018-04-12T09:01:03Z","pushed_at":"2018-04-27T05:56:37Z","git_url":"git://github.com/CompassionCH/social.git","ssh_url":"git@github.com:CompassionCH/social.git","clone_url":"https://github.com/CompassionCH/social.git","svn_url":"https://github.com/CompassionCH/social","homepage":"https://odoo-community.org/project/99","size":1666,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"9.0"}},"base":{"label":"OCA:10.0","ref":"10.0","sha":"3ea5e17f2d79e2e41a6cd2adb4b9d6d34483976a","user":{"login":"OCA","id":7600578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDA1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":39009740,"node_id":"MDEwOlJlcG9zaXRvcnkzOTAwOTc0MA==","name":"social","full_name":"OCA/social","owner":{"login":"OCA","id":7600578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDA1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/social","description":"Addons concerning odoo's social ERP features and messaging in general","fork":false,"url":"https://api.github.com/repos/OCA/social","forks_url":"https://api.github.com/repos/OCA/social/forks","keys_url":"https://api.github.com/repos/OCA/social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/social/teams","hooks_url":"https://api.github.com/repos/OCA/social/hooks","issue_events_url":"https://api.github.com/repos/OCA/social/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/social/events","assignees_url":"https://api.github.com/repos/OCA/social/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/social/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/social/tags","blobs_url":"https://api.github.com/repos/OCA/social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/social/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/social/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/social/languages","stargazers_url":"https://api.github.com/repos/OCA/social/stargazers","contributors_url":"https://api.github.com/repos/OCA/social/contributors","subscribers_url":"https://api.github.com/repos/OCA/social/subscribers","subscription_url":"https://api.github.com/repos/OCA/social/subscription","commits_url":"https://api.github.com/repos/OCA/social/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/social/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/social/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/social/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/social/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/social/merges","archive_url":"https://api.github.com/repos/OCA/social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/social/downloads","issues_url":"https://api.github.com/repos/OCA/social/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/social/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/social/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/social/labels{/name}","releases_url":"https://api.github.com/repos/OCA/social/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/social/deployments","created_at":"2015-07-13T12:06:47Z","updated_at":"2018-05-30T08:43:58Z","pushed_at":"2018-06-01T13:11:34Z","git_url":"git://github.com/OCA/social.git","ssh_url":"git@github.com:OCA/social.git","clone_url":"https://github.com/OCA/social.git","svn_url":"https://github.com/OCA/social","homepage":"https://odoo-community.org/project/99","size":3554,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":144,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":144,"open_issues":42,"watchers":21,"default_branch":"11.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/social/pulls/256"},"html":{"href":"https://github.com/OCA/social/pull/256"},"issue":{"href":"https://api.github.com/repos/OCA/social/issues/256"},"comments":{"href":"https://api.github.com/repos/OCA/social/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/social/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/social/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/social/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/social/statuses/4ff4dc16cd647ef7e337479357b9645172fb1a3e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ecino"}}