Commit Graph

235 Commits

Author SHA1 Message Date
Matteo Pagliazzi
97209e40ad Collection quests: make sure users cannot earn "excess" items (#12098)
* fix(collection quests): make sure users cannot earn "excess" collection items

* add test
2020-04-20 23:12:05 +02:00
Carl Vuorinen
2896cf77e0 Handle simultaneous quest accept/reject (#12090)
* Implement atomic quest accept/reject

* Persist quest.members early to avoid simultaneous handling of accept/reject

* Fix quest accept test (missing expectation)

* PR fixes
2020-04-17 22:57:31 +02:00
Matteo Pagliazzi
c5aeab652d Push Notifications Fixes - Part 2 (#12092)
* push notifications: handle some more error codes and when the user is loaded using .lean()

* fix lint

* do not send push notification if message is missing
2020-04-15 21:36:53 +02:00
hamboomger
fdf7e3a665 fix(db-schema): typo fixed in group.hasCancelled() schema metod name 2020-04-05 15:06:16 +03:00
hamboomger
00d12e83bd refactor(db-schema): group.isSubscribed() method name changed to group.hasActiveGroupPlan() 2020-04-05 15:06:16 +03:00
Sabe Jones
167f4f07b8 feat(content): Confection Pets 2020-04-03 19:25:43 -05:00
Matteo Pagliazzi
ae7df804cb fix(promise): make sure every promise is handled 2020-03-20 20:07:13 +01:00
Alys
82a5bc236f clarify all "Invalid uuid" messages by making each unique 2020-01-29 15:49:55 +10:00
Matteo Pagliazzi
ca69085e8c Merge pull request #11549 from Nikosmonaut/bugfix-11522_group_plan_tags
Fix can not remove group tag
2020-01-19 12:29:04 +01:00
Yo
04a9c97393 Fix Typos (#11644)
* Fix Typos

* Fix More Typos
2019-12-23 17:52:55 +01:00
nikosmonaut
1c719a8dbb Unlink group tags when a user leaves it 2019-12-14 14:54:55 +01:00
Phillip Thelen
b108b047cd Improvements and fixes for push notifications (#11507)
* Strip markdown from push notifications

* Revert "Strip markdown from push notifications"

This reverts commit 4741e584c6.

* correctly set type for mention push notifications

* Add unformattedText field to chat messages

* fiix lint errors

* Add check that markdown formatting is stripped from messages

* Add check for markdown formatting in messages.
2019-11-29 18:46:26 +01:00
Matteo Pagliazzi
3e12774e40 Merge branch 'develop' into client-monorepo 2019-10-18 20:26:12 +02:00
Phillip Thelen
0d9010572c Don't send push notification to users who aren't in the party 2019-10-15 12:48:51 +02:00
Phillip Thelen
4cccaf33e2 Fix failing test 2019-10-14 16:45:24 +02:00
Matteo Pagliazzi
8bae0223bb fix linting for server (except for length of apidoc) 2019-10-10 20:11:50 +02:00
Matteo Pagliazzi
bcf7bcf03c start linting server 2019-10-09 20:42:16 +02:00
Matteo Pagliazzi
621787915c start upgrading eslint 2019-10-08 16:57:10 +02:00
Phillip Thelen
2d3f2500e8 Improve handling for sending mention notifications 2019-10-01 13:26:38 +02:00
Phillip Thelen
bbbe0cca09 Add push notification for party activity (#11319)
* Add push notification for party activity

* Improve inbox notifications

* move sendChatPushNotifications method

* Fix import

* Fix failing test

* Improve notification display on iOS

* correctly set push notification environment
2019-09-30 19:36:22 +02:00
Phillip Thelen
17e8b0a0fd Improve wording for push notifications (#11378) 2019-09-29 18:45:30 +02:00
Sabe Jones
01d272d2c4 Teams Updates 201908 (#11347)
* fix(teams): no hover bg change for noninteractive checkboxes

* feat(teams): send notification to managers on task claim
Also fix client unit test broken by prev commit

* feat(groups): don't penalize for tasks assigned since last activity

* fix(tests): actually fix client unit

* fix(teams): improve task styles

* fix(teams): let people other than leader see relevant approvals
Also more style fixes

* fix(approvals): better filtering and task headings for approval data

* fix(test): correct test expectations for new GET /approvals behavior

* fix(groups): style tweaks

* different border for group and normal tasks

* fix(teams): remove extra click for claiming

* fix(teams): leaders & managers can check off approval-required tasks

* fix(teams): don't notify user of own claim

* fix group task margin and z-index on hover

* fix(menu): sporadic error in top bar

* fix(teams): more approval header and footer adjustments

* fix(tests): adjust expectations for self-approval

* fix(teams): address PR comments

* refactor(timestamps): date user activity on authenticated requests

* refactor(timestamps): update local user instead of direct db update
2019-09-26 14:49:11 -04:00
Phillip Thelen
04420aa60e Always send push notifications in recipients language (#11307)
* Load data needed for members when inviting to quest

* Always send push notifications in recipients language. Fixes #8718

* Remove console.log
2019-08-15 11:00:46 -04:00
Alys
c80de38572 add shadow-muting chat hiding feature (automatic flagging of public posts from shadow-muted players) - fixes 10851 (#11239)
* move existing tests for chatRevoked users to 'mute user' describe block

* give consistent names to chatRevoked tests and use const not let

* improve methods for restoring chat permissions to test users

* add tests for shadow-muting and define constants for flag-related numbers

* update user profile URLs and reverse private/public 'if' statements

* implement shadow muting in the API and schemas

* add interface for mods to turn shadow muting on/off for a user

- checkbox in the Hall
- icon in the user's profile

* mark chat posts as being shadow muted (marking is visible to mods only)

* convert Admin Tools in profile from icons to text; make crown icon a toggle

* move logic for displaying flag count to a computed property

* prevent chat notifications for shadow-muted posts
2019-07-30 19:09:42 +02:00
Sabe Jones
81333a3074 feat(notifications): alert user to achievements 2019-06-11 13:06:00 -05:00
Sabe Jones
e9a5e084fc fix(tests): use baseline quest with fewer update calls 2019-06-04 16:09:01 -05:00
Sabe Jones
7094e75dd8 feat(achievements): new pet-related cheevos 2019-06-04 10:31:25 -05:00
Matteo Pagliazzi
eff8db0afd fix issue with language being undefined, refactoring auth middleware, new tests 2019-05-15 16:54:55 +02:00
Mateus Etto
ab0dae8df3 Translate messages only after serialization 2019-05-15 21:26:23 +09:00
Mateus Etto
0824af05b7 Remove unneeded parameter on method call 2019-05-15 19:45:42 +09:00
Mateus Etto
28bf024990 Move translateMessage to libs 2019-05-15 19:07:17 +09:00
Mateus Etto
8a30ac0607 Add translation support for quest cancel 2019-05-15 16:55:37 +09:00
Mateus Etto
0360326f41 Change translateSystemMessages to be a class method 2019-05-15 15:46:32 +09:00
Sabe Jones
90532b0763 Merge branch 'develop' into Yutsuten/party-chat-translations 2019-05-08 15:13:53 -05:00
Sabe Jones
1135ab946e Sabrecat/groups quick wins (#11146)
* WIP(groups): quickish wins

* WIP(groups): two quick wins
1. Don't show task creation button if user is not leader or manager
2. Don't require JS confirm() for approving tasks

* fix(group-plans): allow delete from options button

* fix(group-plans): update tasksOrder when task deleted

* fix(group-tasks): dismiss notification when user takes action

* refactor(tasks): DRY out create button styling

* fix(group-tasks): sync after claiming/unclaiming

* fix(claiming): better sync and notif handling

* fix(tasks): force sync instead of explicitly clearing notif

* fix(tasks): reposition task creation button

* fix(group-tasks): default to single completion

* fix(group-tasks): move completion condition field above approval switch

* fix(group-tasks): todo validation error and approval notif dismissal

* fix(group-tasks): default single completion on client

* fix(group-tasks): move completion condition up more

* fix(group-tasks): maintain client-side user assignment list

* fix(group-tasks): remove approval notifications when task deleted

* fix(group-tasks): send assigned task to top of task list

* fix(group-tasks): remove useless tag filter dropdown

* feat(group-tasks): notify user of assigned task

* fix(group-tasks): don't allow approval of tasks w/ no approval request

* fix(tests): adjust expectations

* fix(group-tasks): more sensible action on assignment notif click
2019-04-29 13:38:28 -05:00
Sabe Jones
76ae41875d Group Plans quick wins (#11107)
* WIP(groups): quickish wins

* WIP(groups): two quick wins
1. Don't show task creation button if user is not leader or manager
2. Don't require JS confirm() for approving tasks

* fix(group-plans): allow delete from options button

* fix(group-plans): update tasksOrder when task deleted

* fix(group-tasks): dismiss notification when user takes action

* refactor(tasks): DRY out create button styling

* fix(group-tasks): sync after claiming/unclaiming
2019-04-15 10:48:27 -05:00
negue
faa0611ab2 Merge branch 'develop' of https://github.com/HabitRPG/habitica into negue/flagpm 2019-01-27 18:14:51 +01:00
negue
61606cb69d change to User ID - change mail var _DISPLAYNAME _DISPLAY_NAME 2019-01-04 21:04:41 +01:00
Rene Cordier
7c954f7073 Prevent progress being cleared when quest ends (#10870)
* Prevent progress being cleared when quest ends

changing group tests to make sure it keeps user's progress

fix and remove .only() from tests

* fix tests and check null case for clearing up user's quest without resetting progress
2018-12-28 19:16:21 +01:00
Sabe Jones
979497dd35 fix(deletion): user delete bugs
Correct lookup in GDPR script, and address a TypeError when deleting a user with no tasks
2018-12-14 00:54:59 +00:00
Phillip Thelen
42b146d5d0 Attach client to chat messages (#10845)
* Attach client to chat messages

* Word

* Design tweaks

* Fix potential error
2018-11-26 10:45:42 +01:00
Matteo Pagliazzi
e76bdbd62d Fix for #10814, prevent ParallelSave errors (#10852)
* fix(group leave): prevent ParallelSave errors while leaving a group with multiple group or challenge tasks

* fix typo
2018-11-18 20:48:16 +01:00
Nathanael Farley
ff81e55839 groupChatReceived webhook fix (#10802)
* Moved sendGroupChatReceivedWebhooks to group.sendChat function.

* Added test for new functionality.
2018-11-17 10:48:41 +01:00
SabreCat
239f78674b fix(usernames): address failing tests 2018-11-14 01:44:09 +00:00
Sabe Jones
b1dd79f75c fix(invites): bogus validation errors 2018-11-07 15:58:17 -06:00
Sabe Jones
4f86abd6b2 Merge branch 'develop' into sabrecat/usernames-master 2018-11-07 08:39:57 -06:00
Matteo Pagliazzi
79c0499672 Mongoose: use $type as the typeKey (#10789)
* use $type as the typeKey in mongoose

* fix and add tests
2018-10-28 15:42:48 -05:00
Matteo Pagliazzi
d1b86e6c14 Remove code for Pusher (#10774)
* remove pusher

* fix linting
2018-10-23 13:25:52 +02:00
Matteo Pagliazzi
c813afba44 Upgrade mongoose (#10767)
* fix mongoose and upgrade

* fix more validations
2018-10-23 13:25:14 +02:00
Matteo Pagliazzi
1f44444a50 Fix subcriptions remaining time disappearing after cancelling (#10761)
* add hasCancelled method for group/user, prevent cancelling a subscription twice

* wip

* paypal: do not cancel a subscription twice

* make sure hasCancelled and hasNotCancelled return a boolean result
2018-10-18 12:14:07 +02:00