fix(client): ctrl-enter can be used to send chat

fixes #8122
This commit is contained in:
Blade Barringer
2016-10-12 20:17:58 -05:00
parent d04a4fb1ed
commit a2cfeafc02
4 changed files with 14 additions and 2 deletions

View File

@@ -60,6 +60,12 @@ habitrpg.controller('ChatCtrl', ['$scope', 'Groups', 'Chat', 'User', '$http', 'A
});
}
$scope.keyDownListener = function (e) {
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
$scope.postChat($scope.group, $scope.message.content);
}
};
$scope.deleteChatMessage = function(group, message){
if(message.uuid === User.user.id || (User.user.backer && User.user.contributor.admin)){
var previousMsg = (group.chat && group.chat[0]) ? group.chat[0].id : false;