{"action":"closed","issue":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7230","repository_url":"https://api.github.com/repos/HabitRPG/habitrpg","labels_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7230/labels{/name}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7230/comments","events_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7230/events","html_url":"https://github.com/HabitRPG/habitrpg/issues/7230","id":154846548,"number":7230,"title":"[API v3] Cannot flag chat messages (and probably can't unflag either)","user":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/milestones/6","html_url":"https://github.com/HabitRPG/habitrpg/milestones/API%20V3","labels_url":"https://api.github.com/repos/HabitRPG/habitrpg/milestones/6/labels","id":1343783,"number":6,"title":"API V3","description":"","creator":{"login":"crookedneighbor","id":2916945,"avatar_url":"https://avatars.githubusercontent.com/u/2916945?v=3","gravatar_id":"","url":"https://api.github.com/users/crookedneighbor","html_url":"https://github.com/crookedneighbor","followers_url":"https://api.github.com/users/crookedneighbor/followers","following_url":"https://api.github.com/users/crookedneighbor/following{/other_user}","gists_url":"https://api.github.com/users/crookedneighbor/gists{/gist_id}","starred_url":"https://api.github.com/users/crookedneighbor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crookedneighbor/subscriptions","organizations_url":"https://api.github.com/users/crookedneighbor/orgs","repos_url":"https://api.github.com/users/crookedneighbor/repos","events_url":"https://api.github.com/users/crookedneighbor/events{/privacy}","received_events_url":"https://api.github.com/users/crookedneighbor/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":125,"state":"open","created_at":"2015-10-08T02:15:57Z","updated_at":"2016-05-18T14:51:12Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-05-14T10:35:16Z","updated_at":"2016-05-18T14:51:12Z","closed_at":"2016-05-18T14:51:12Z","body":"### Description\r\nWhen trying to flag a message, the confirmation modal appears, but clicking on the \"Report Violation\" button does not dismiss the modal. If you cancel the modal, you can see a flag on the message but the flag disappears as soon as you refetch chat (i.e., it's applied client side but not server side).\r\n\r\n\r\n#### Console Errors\r\n````\r\napp-010542b5.js:6 TypeError: Cannot read property 'flagChatMessage' of undefined\r\n    at j.a.reportAbuse (app-010542b5.js:45)\r\n````\r\n\r\nI believe that's referring to this code from `website/client/js/controllers/memberModalCtrl.js` :\r\n\r\n````\r\n      $scope.reportAbuse = function(reporter, message, groupId) {\r\n        message.flags[reporter._id] = true;\r\n        Chat.utils.flagChatMessage({gid: groupId, messageId: message.id}, undefined, function(data){\r\n          Notification.text(window.env.t('abuseReported'));\r\n          $scope.$close();\r\n        });\r\n      };\r\n````"}}