mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Api v3 fixes continued (#7205)
* Added timzeone offset back * Added APIToken back to settings page * Fixed fetch recent messages for party * Fixed returning group description * Fixed check if user is member of challenge * Fixed party members appearing in header * Updated get myGroups param to include public groups. Fixed isMemberOf group * Fixed hourglass purchase * Fixed challenge addding tasks on first creating * Updated tests to accomidate new changes
This commit is contained in:
committed by
Matteo Pagliazzi
parent
cc20812674
commit
1fd7df7521
@@ -63,7 +63,7 @@ habitrpg.controller('ChatCtrl', ['$scope', 'Groups', 'Chat', 'User', '$http', 'A
|
||||
}
|
||||
}
|
||||
|
||||
$scope.likeChatMessage = function(group,message) {
|
||||
$scope.likeChatMessage = function(group, message) {
|
||||
if (message.uuid == User.user._id)
|
||||
return Notification.text(window.env.t('foreverAlone'));
|
||||
|
||||
@@ -114,14 +114,13 @@ habitrpg.controller('ChatCtrl', ['$scope', 'Groups', 'Chat', 'User', '$http', 'A
|
||||
});
|
||||
};
|
||||
|
||||
$scope.sync = function(group){
|
||||
if(group.type == 'party') {
|
||||
group.$syncParty(); // Syncs the whole party, not just 15 members
|
||||
} else {
|
||||
group.$get();
|
||||
}
|
||||
// When the user clicks fetch recent messages we need to update
|
||||
// that the user has seen the new messages
|
||||
$scope.sync = function(group) {
|
||||
//@TODO: We need to use chat service here
|
||||
Groups.Group.get(group._id)
|
||||
.then(function (response) {
|
||||
$scope.group = response.data.data;
|
||||
})
|
||||
|
||||
Chat.markChatSeen(group._id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user