* removing wrong info on updating challenge leader
as discussed in the Aspiring Comrades, doing the change because the route `/api/v3/challenges/:challengeId` can't be used to change challenge leader, so I am deleting it from the docs
* adding summary to section title
as requested by @paglias
* missing comma
* fix(lint): line length
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
* Ensure official challenges are listed first
* Fix lint errors
* Move query creation into separate function
* switching branches
* Fixes and tests
* Formatting fixes
* Linting
* fix tests
* Implement atomic user challenges update
Prevents multiple concurrent requests from passing through
Fixes#11295
* Move user challenges update to separate method
* Rename challenge syncToUser to syncTasksToUser
Now that adding the challenge to user is separated, this methods main purpose is to sync the tasks
* Fix lint errors
* improve comments for api.getUserChallenges
* clarify members parameter when creating test guilds
I was uncertain about this parameter and read the code to clarify it.
Reading a comment is easier. :)
* add "Custom Day Start time" to api route's title as it's the common name
* use the same paging for "myChallenges" only loads 10 per call
* challenges: show loading above the load-more button (instead at the top)
* purple loading message and flat load-more button
* remove comment
* show loadMore button only when the request has 10 entries
* challenge card ui
- Adds the member's username to the challenge csv
- Updates to unit tests
- Issue #10955
Supports the ability for challenge owners to judge challenge winners
after the added functionality enabling users to modify their name
(display name). The added field ties the user to their results by
their username.
* shared model for chat and inbox
* disable inbox schema
* inbox: use separate model
* remove old code that used group.chat
* add back chat field (not used) and remove old tests
* remove inbox exclusions when loading user
* add GET /api/v3/inbox/messages
* add comment
* implement DELETE /inbox/messages/:messageid in v4
* implement GET /inbox/messages in v4 and update tests
* implement DELETE /api/v4/inbox/clear
* fix url
* fix doc
* update /export/inbox.html
* update other data exports
* add back messages in user schema
* add user.toJSONWithInbox
* add compativility until migration is done
* more compatibility
* fix tojson called twice
* add compatibility methods
* fix common tests
* fix v4 integration tests
* v3 get user -> with inbox
* start to fix tests
* fix v3 integration tests
* wip
* wip, client use new route
* update tests for members/send-private-message
* tests for get user in v4
* add tests for DELETE /inbox/messages/:messageId
* add tests for DELETE /inbox/clear in v4
* update docs
* fix tests
* initial migration
* fix migration
* fix migration
* migration fixes
* migrate api.enterCouponCode
* migrate api.castSpell
* migrate reset, reroll, rebirth
* add routes to v4 version
* fix tests
* fixes
* api.updateUser
* remove .only
* get user -> userLib
* refactor inbox.vue to work with new data model
* fix return message when messaging yourself
* wip fix bug with new conversation
* wip
* fix remaining ui issues
* move api.registerLocal, fixes
* keep only v3 version of GET /inbox/messages
* rename hasAccess to canJoin for challenges
This is so the function won't be used accidentally for other
purposes, since hasAccess could be misinterpretted.
* add isLeader function for challenges
* allow challenge leader to join/modify/end challenge when they're not in the private group it's in
* delete duplicate test
* clarify title of existing tests
* add tests and adjust existing tests to reduce privileges of test users
* fix lint errors
* remove pointless isLeader check (it's checked in canJoin)
* remove parallel saves from the code
* fix more unit tests
* do not save users when sending message in buyGift (saved later)
* fix test
* reinstall
* fix tests
* fix tests
* remove inbox from user/stats routes
* remove inbox from news routes
* change signature for authWithHeaders
* do not load inbox in coupons routes
* do not load inbox in challenge routes
* do not load inbox in some members routes
* do not load inbox in chat routes
* removing file that only contained a reference to a missing folder
* fixing typo
* using full dates to avoid moment warning in tests
* more typos
* sending an empty string to vue bootstrap tooltip (disabling it) if no challenge short name is set
* Fix challenges export CSV error by checking that users still belong to challenge
* Add test for challenge csv export fix
* Update fix for challenge export CSV bug
* Update tests for challenge export CSV to be more complete
* Refactor a test: change some 'let' variables to 'const'
* Removed challenge group duplication
* Removed duplication of joined challenge
* Moved helpers to challenge library
* Passed group to function
* Fixed group response
* Added clone api
* Added new clone UI
* Fixed challenge clone
* Fixed lint and added mongo toObject
* Removed clone field, fixed type, fixed challenge task query
* Auto selected group
* Accounted for group balance when creating challenge
* Added check for if user is leader of guild
* Added leader existence check
* Added fix for leader and prizecost equal to
* feat(analytics): track challenge and task events
* feat(analytics): add more challenge events
Also tweaks data for better troubleshooting utility
* refactor(analytics): include IDs for challenges/groups
* refactor(analytics): term for award challenge is "close"
* test get party challenges by party ID
* tavern challenge tests; failing tests with ID 'party' or 'habitrpg'
* allow finding challenges by groupid 'party' or 'habitrpg'
* use single quotes in strings
* create new summary field for challenges
* finish implementating summary for challenges, add some support for guilds
* make small improvements to challenges code
* fix lint errors
* add more code to support summaries for guilds (still more needed)
* fix existing tests by adding summary field
* make existing tests pass
* WIP make "Public Challenges" text translatable
* change "leader" locale key to "guildOrPartyLeader" to make searches for it easier
* remove v-once from h2 headings
* remove failed attempt to localise text in <script>
* add quick-and-dirty error checking for guild not having categories
* make "Public Challenges" text translatable
* rename final ...PlaceHolder strings to ...Placeholder (lower-case "h") for consistency with existing Placeholder strings
* Forced full refresh after deletE
* Fixed styles on firefox
* Removed instagram link
* Added information to modal
* Fixed deleteing and task keeping
* Added redirect to challenge detail after created
* Updated challenge item styles
* Added new limit option to challenges
* Added image
* Added new achievement to user schema
* Added new achievement to content
* Added new achievement to libs
* Added achievement text to locale
* Added achievement to notification model and controller
* Grant achievement on joining or creating first challenge
* Added achievement to modal template
* Compiled new sprites
* Added integration tests
* Fix linting error
* Leaving a group or a guild no longer removes the user from the challenges of that group or guild.
* Updating api docs for leaving group to take into account the default path no longer leaving challenges when leaving a group.
* Updating api docs for leaving group to take into account the default path no longer leaving challenges when leaving a group.
* refactored according to blade's comments to not be a breaking change. The api now accepts a body parameter to specify wether the user
should remain in the groups challenges or leave them. The change also adds more tests around this behavior to confirm that it works
as expected.