* update packages on local/origin repo
* feat(challenges): add banned words & slur blocker to challenges
* feat(challenges): slur blocker work
* feat(challenges): slur blocker
* feat(challenges): more slur blocker
* feat(challenges): even more slur blocker
* feat(challenges): swear and slur blocker
* feat(challenges): update behavior based on public/private groups
* feat(profiles): slur/swear blocker
* feat(profiles): slur/swear blocker
* feat(profiles/PMs): slur/swear blocker upgrade
* feat(slur/swear): working on it
* feat(profiles/challenges): work on profile block & slack report
* feat(slur/swear blocker): work on Profiles
* feat(slur blocker): refactoring code
* feat(slur blocker): more refactoring
* feat(slur blocker): arghhhhhh
* fix(profiles): improve profanity check logic
* fix(slack): update Slack notification to include authorEmail and remove undefined
* feat(s/s blocker): work on challenges
* feat(s/s blocker): challenge update
* feat(s/s blocker): slack notifs refinements
* feat(s/s blocker): refine slack notifs & disallow use of challenges POST API route if user is chatRevoked:true in db
* update package.json and package-lock.json
* attempt to disable create challenge button for muted users
* another attempt to disable create challenge
* block muted users from creating challenges
* CSS button fun
* fix CSS button
* refactor(css): move button style to global
Also, disable Clone button if user is chat revoked
* fix(lint): remove unused fn
* fix(challenges): handle null slur check
* fix(groups): throw notFound earlier
* fix(challenges): CSS and logic updates
* fix(lint): remove whitespace
* fix(challenges): don't disable create buttons
* fix(slack): restore broken profile flag fields
* chore(cleanup): remove comments and whitespace
* chore(cleanup): one more white space
---------
Co-authored-by: SabreCat <sabe@habitica.com>
* initial commit
* update logic to display flagged challenges properly to users and admins
* add report button to pages 'My Challenges' and 'Discover Challenges'
* allow mods to view flagged messages on challengeDetail view
* update showing flagged challenges for group challenges
* update showing flagged challenges for a specific challenge
* disallow closing a flagged challenge
* update notes to reflect apiParams properly
* fix css spacing
* update challenge en locales
* fix spacing
* update title of closeChallengeModal
* let user know flagged challenges cannot be cloned
* fix linting errors
* ensure flagged challenges cannot be declared with a winner and cloned via API
* define a non user challenge properly
* fix logic to check for a nonParticipant and nonLeader user when grabbing flagged challenges
* fix linting of max character of 100 / line
* remove reporting on 'my challenges' and 'discover challenges'
* WIP(challenges): disable clone button and add notes to new functions
* WIP(challenges): smol changes
* WIP(challenges): clone button only disabled for admin and flagged user; other users can still clone but the flag goes along with the clone
* WIP(challenges): stop flags carrying over on cloned challenges
* WIP(challenges): typo fixing, undoing a smol change
* fix(challenges): improved query logic for flags
* WIP(challenges): more smol changes
* fix(challenges): refactor queries
* fix(challenges): correct My Challenges tab logic
* WIP(challenges): fix clone button state
* WIP(challenges): really fixed clone button & clear flags from clones
* WIP(challenge): implement new design for reporting modal
* WIP(challenge): making things pretty
* WIP(challenge): conquering the close button
* WIP(challenge): fixin some spacing
* WIP(challenge): smol fix
* WIP(challenge): making sure the button is actually disabled
* WIP(challenge): fix blockquote css
* fix(tests): no private guilds
* fix(lint): curlies etc
* fix(test): moderator permission
* fix(lint): sure man whatever
* fix(lint): bad vim no tabby
* fix(test): permissions not contrib lol
* fix(challenges): add icon and fix leaky CSS
* fix(challenge): correct clone button behavior
---------
Co-authored-by: Julius Jung <me@matchajune.io>
Co-authored-by: SabreCat <sabe@habitica.com>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
* add max length validations for summary in challenge create and update controllers
* Add validation to group APIs
* fix lint errors
* add validation to group plan
* fix imports
* add tests
* add max length validations for summary in challenge create and update controllers
* Add validation to group APIs
* fix lint errors
* add validation to group plan
* fix imports
* add tests
* lint checks
* when filtering by owned challenges, challenges that a user owns but has not joined will be included
* add tests for filtering challenges by owned
* fix lint
* 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