mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
Added some logic for adding flags
This commit is contained in:
parent
74b94e6764
commit
5a6c9fbf84
1 changed files with 4 additions and 0 deletions
|
|
@ -148,6 +148,10 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
|||
})
|
||||
}
|
||||
$scope.reportAbuse = function(reporter, message) {
|
||||
if(!message.flags) message.flags = {};
|
||||
message.flags[User.user._id] = true;
|
||||
// Post to API should look something like this
|
||||
//$http.post(ApiUrlService.get() + '/api/v2/groups/' + group._id + '/chat/' + message.id + '/flag');
|
||||
Notification.text(window.env.t('abuseReported'));
|
||||
$rootScope.User.sync();
|
||||
$scope.$close();
|
||||
|
|
|
|||
Loading…
Reference in a new issue