mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
v3 client: fix chat flagging
This commit is contained in:
@@ -49,18 +49,20 @@ habitrpg
|
|||||||
|
|
||||||
$scope.reportAbuse = function(reporter, message, groupId) {
|
$scope.reportAbuse = function(reporter, message, groupId) {
|
||||||
message.flags[reporter._id] = true;
|
message.flags[reporter._id] = true;
|
||||||
Chat.utils.flagChatMessage({gid: groupId, messageId: message.id}, undefined, function(data){
|
Chat.flagChatMessage(groupId, message.id)
|
||||||
Notification.text(window.env.t('abuseReported'));
|
.then(function(data){
|
||||||
$scope.$close();
|
Notification.text(window.env.t('abuseReported'));
|
||||||
});
|
$scope.$close();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.clearFlagCount = function(message, groupId) {
|
$scope.clearFlagCount = function(message, groupId) {
|
||||||
Chat.utils.clearFlagCount({gid: groupId, messageId: message.id}, undefined, function(data){
|
Chat.clearFlagCount(groupId, message.id)
|
||||||
message.flagCount = 0;
|
.then(function(data){
|
||||||
Notification.text("Flags cleared");
|
message.flagCount = 0;
|
||||||
$scope.$close();
|
Notification.text("Flags cleared");
|
||||||
});
|
$scope.$close();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user