mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
rtc fixes: do not show notification if message was sent by current user from different computer or mobile, put back message syncing on posting for guilds and tavern
This commit is contained in:
@@ -26,8 +26,13 @@ habitrpg.controller('ChatCtrl', ['$scope', 'Groups', 'Chat', 'User', '$http', 'A
|
||||
$scope.postChat = function(group, message){
|
||||
if (_.isEmpty(message) || $scope._sending) return;
|
||||
$scope._sending = true;
|
||||
// var previousMsg = (group.chat && group.chat[0]) ? group.chat[0].id : false;
|
||||
Chat.postChat(group._id, message) //, previousMsg) not sending the previousMsg as we have real time updates
|
||||
|
||||
var previousMsg = false;
|
||||
if (group.type !== 'party' && group.chat && group.chat[0]) { // not sending the previousMsg for parties as we have real time updates
|
||||
previousMsg = group.chat[0].id;
|
||||
}
|
||||
|
||||
Chat.postChat(group._id, message, previousMsg)
|
||||
.then(function(response) {
|
||||
var message = response.data.data.message;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user