* Update webhook.js
Add `questOwner: group.quest.leader,` to webhook.js
* Update POST-groups_groupId_quests_invite.test.js
Test if questOwner contains the correct data
* Update POST-groups_groupId_quests_invite.test.js
* Update webhooks.test.js
* upgrade stripe module
* switch stripe api to latest version
* fix api version in tests
* start upgrading client and server
* client: switch to redirect
* implement checkout session creation for gems, start implementing webhooks
* stripe: start refactoring one time payments
* working gems and gift payments
* start adding support for subscriptions
* stripe: migrate subscriptions and fix cancelling sub
* allow upgrading group plans
* remove console.log statements
* group plans: upgrade from static page / create new one
* fix#11885, correct group plan modal title
* silence more stripe webhooks
* fix group plans redirects
* implement editing payment method
* start cleaning up code
* fix(stripe): update in-code docs, fix eslint issues
* subscriptions tests
* remove and skip old tests
* skip integration tests
* fix client build
* stripe webhooks: throw error if request fails
* subscriptions: correctly pass groupId
* remove console.log
* stripe: add unit tests for one time payments
* wip: stripe checkout tests
* stripe createCheckoutSession unit tests
* stripe createCheckoutSession unit tests
* stripe createCheckoutSession unit tests (editing card)
* fix existing webhooks tests
* add new webhooks tests
* add more webhooks tests
* fix lint
* stripe integration tests
* better error handling when retrieving customer from stripe
* client: remove unused strings and improve error handling
* payments: limit gift message length (server)
* payments: limit gift message length (client)
* fix redirects when payment is cancelled
* add back "subUpdateCard" string
* fix redirects when editing a sub card, use proper names for products, check subs when gifting
* upgrade helmet to version 4
* deps(short-uuid): upgrade to version 4, closes#12573
* deps(slack): upgrade to version 4
* deps(slack): upgrade to version 5, closes#11442
* deps(amplitude): upgrade to latest version use api v2
* fix tests
* slack tests: return promise
* refactor slack setup for tests
* fix slack unit tests
* fix(banned words): fix partial matching of words containing diacritics against banned words list (#12309)
* lint: remove whitespace to fix error
* test: add test to prevent partial matching of words containing diacritics against banned words list (#12309)
* doc: add link to Unicode table of diacritical marks (#12309)
* content: add gems blocks
* gemsBlocks: include ios and android identifiers
* wip: promo code
* split common constants into multiple files
* add second promo part
* geCurrentEvent, refactor promo
* fix lint
* fix exports, use world state api
* start adding world state tests
* remove console.log
* use gems block for purchases
* remove comments
* fix most unit tests
* restore comment
* fix lint
* prevent apple/google gift tests from breaking other tests when stub is not reset
* fix unit tests, clarify tests names
* iap: use gift object when gifting gems
* allow gift object with less data
* fix iap tests, remove findById stubs
* iap: require less data from the mobile apps
* apply discounts
* add missing worldState file
* fix lint
* add test event
* start removing 20 gems option for web
* start adding support for all gems packages on web
* fix unit tests for apple, stripe and google
* amazon: support all gems blocks
* paypal: support all gems blocks
* fix payments unit tests, add tests for getGemsBlock
* web: add gems plans with discounts, update stripe
* fix amazon and paypal clients, payments success modals
* amazon pay: disabled state
* update icons, start abstracting payments buttons
* begin redesign
* redesign gems modal
* fix buttons
* fix hover color for gems modal close icon
* add key to world state current event
* extend test event length
* implement gems modals designs
* early test fall2020
* fix header banner position
* add missing files
* use iso 8601 for dates, minor ui fixes
* fix time zones
* events: fix ISO8601 format
* fix css indentation
* start abstracting banners
* refactor payments buttons
* test spooky, fix group plans box
* implement gems promo banners, refactor banners, fixes
* fix lint
* fix dates
* remove unused i18n strings
* fix stripe integration test
* fix world state integration tests
* the current active event
* add missing unit tests
* add storybook story for payments buttons component
* fix typo
* fix(stripe): correct label when gifting subscriptions
* hide upgrade button for public guilds
* prevent group plans for public guilds
* fix unit tests
* fix integration and unit tests that assumed group plans could be public guilds
* more unit tests fixes
* more resilient unit test
* more resilient unit test
* Issue 10209 - Remove read usages of zone
* Issue 10209 - Add coverage on daysSince and startOfDay cron utility functions
* Issue 10209 - Add unit test for daysUserHasMissed method
* Issue 10209 - Remove usages of deprecated `moment.js#zone` method.
* Issue 10209 - Add helper function to centralise logic
Also simplify timezoneOffsetToUtc function in site.vue
* Issue 10209 - Also add getUtcOffset as method on user
Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
* add run-rs to dependencies
* wip: add replica set to api unit github action
* wip: add replica set to api unit github action
* wip: fix gh actions mongodb replica set setting
* usa replica set for integration tests
* add correct mongodb version matrix for integration tests
* use different db connection on gh actions
* Revert "use different db connection on gh actions"
This reverts commit aa8db759d3.
* add example transaction
* add mongo script to package.json
* abstract mongodb utils, connect using hostname on windows
* npm scripts: mongo -> mongo:dev
* add setup script for run-rs on windows
* gh actions: run in test environment
* remove test files
* better error handling, use cross-spawn to avoid issues on windows
* fix lint
* fix(chat) - Don't insert user link in url-less link and properly log source-mapping failures
* fix(chat) - Add link to markdown spec and list of known issues
* fix(chat) - Log regular expression as String
* Issue 10924 - Don't break up links with mention links
* Issue 10924 - Recognise links between brackets.
* Issue 10924 - Rely on markdown parser for link determination
* Issue 10924 - Only increment index once in findTextBlocks
* Improve whitespacing in highlightMentions.js unit test
* Issue 11504 - Don't link users in markdown code blocks
Use the markdown-it parser to determine what parts of the message are code block first.
Then work from those parser tokens back to content parts that should not be handled.
Still convoluted, but can be improved once a "user mention plugin" is added to habitica-markdown.
* Issue 11504 - Put functions in JavaScript order and fix linting issues
* Issue 11504 - Use includes i.o. multiple or checks and added some context.
* Issue 11504 - Add docstring for highlightMentions and simplify fence regex
* Issue 11504 - Replace inline recursor with default parameter value
* add date check
* achievements modal polishing
* refresh private-messages page when you are already on it
* add countbadge knob to change the example
* fix lint
* typos
* typos
* typos
* add toggle for achievements categories
* typo
* fix test
* fix edit avatar modal cannot be closed
* WIP(settings): subscriber page improvements
* WIP(subscriptions): more design build-out
* fix(css): disabled button styles
* fix(css): better Amazon targeting
* fix hide tooltip + align header correctly
* disable perfect scroll
* load messages on refresh event
* fix header label + conversation actions not breaking layout on hover
* WIP(g1g1): notif
* WIP(g1g1): notif cont'd
* fix(test): snowball change
* fix(event): feature NYE card
* chore(sprites): compile
* fix(bgs): include TT required field
* add gifting banner to the max height calculation
* chore(event): enable winter customizations
* WIP(gifting): partial modal implementation
* feat(gifting): select giftee modal
* fix(gifting): notification order, modal dismiss
* Begin implementing sign in with apple
# Conflicts:
# package-lock.json
# website/common/script/constants.js
# website/server/libs/auth/social.js
# website/server/models/user/schema.js
* Add apple sign in button to website
* fix lint errors
* fix config json
* fix(modals): correct some repops
* fix(gifting): style updates
* fix(buy): modal style changes
* fix(modals): also clean out "prev"
* Attempt workaround for sign in with apple on android
* temporarily log everything as error
* refactor(modals): hide in dismiss event
* fix temporary test failure
* changes to sign in with apple
* fix: first batch of layout issues for private messages + auto sizing textarea
* fix(modals): new dismiss logic
* fix(modals): new dismiss no go??
* Only use email scope
* print debugging
* .
* ..
* ...
* username second line - open profile on face-avatar/conversation name - fix textarea height
* temporarily disable apple auth and just return data for debugging
* Hopefully this works
* .....
* WIP(subscription): unsubscribed state
* .
* ..
* MAYBE THIS ACTUALLY WORKS???
* Implement apple sign in
* fix some urls
* fix urls
* fix redirect and auth
* attempt to also request name
* fix lint error
* WIP(subscription): partial subscribed
* chore(sprites): compile
* Change approach so that it actually works
* fix config error
* fix lint errors
* Fix
* fix lint error
* lint error
* WIP(subscription): finish subscribed
* refresh on sync
* new "you dont have any messages" style + changed min textarea height
* new conversationItem style / layout
* reset message unread on reload
* chore(npm): update package-locks
* fix styles / textarea height
* feat(subscription): revised sub page RC
* list optOut / chatRevoked informations for each conversation + show why its disabled
* Improve apple redirect view
* Fix apple icon on group task registration page
* WIP(adventure): prereqs
* Block / Unblock - correct disabled states - $gray-200 instead of 300/400
* canReceive not checking chatRevoked
* fix: faceAvatar / userLink open the selected conversation user
* check if the target user is blocking the logged-in user
* fix(subs): style tweaks
* fix(profiles): short circuit contributor
Attempted fix for #11830
* chore(sprites): compile
* fix(content): missing potion data
* fix(content): missing string
* WIP(drops): new modal
* fix(subs): moar style tweaks
* check if blocks is undefined
* max-height instead of height
* fix "no messages" state + canReceive on a new conversation
* WIP(adventure): analytics fixes etc
* Improve apple signin handling
* fixed conversations width (280px on max 768 width page)
* feat(adventure): random egg+potion on 2nd task
* fix(lint): noworkies
* fix(modal): correctly construct classes
* fix(tests): expectations and escape
* Fix typo
* use base url from env variables
* fix lint
* call autosize after message is sent
* fix urls
* always verify token
* throw error when social auth could not retrieve id
* Store emails correctly for apple auth
* Retrieve name when authenticating through apple
* Fix lint errors
* fix all lint errors
* fix(content): missing strings
* Revert "always verify token"
This reverts commit 8ac40c76bf.
# Conflicts:
# website/server/libs/auth/social.js
* Correctly load name
* remove extra changes
* remove extra logger call
* reset package and package-lock
* add back missing packages
* use name from apple
* add support for multiple apple public keys
* add some unit and integration tests
* add apple auth integration test
* tweak social signup buttons
* pixel pushing
Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
Co-authored-by: negue <eugen.bolz@gmail.com>
Co-authored-by: Phillip Thelen <phillip@habitica.com>
* fix(webhooks): don t parse response as json
* upgrade got to version 10
* remove old header
* fix tests
* fix email auth
* add migration
* update email error
* split migration in two