Commit Graph

68 Commits

Author SHA1 Message Date
Phillip Thelen
57fb7ca6f2 fix 2023-02-24 11:25:53 +01:00
Phillip Thelen
be18476292 correctly set perkMonthCount 2023-02-23 13:20:47 +01:00
Phillip Thelen
3f56b7fa3f fix offset calculation 2023-02-17 15:42:31 +01:00
Phillip Thelen
d69de2948b fix import 2023-02-16 09:58:09 +01:00
Phillip Thelen
2d5dcae406 fix tests 2023-02-16 09:37:00 +01:00
Phillip Thelen
ad6555c92b fix import 2023-02-06 17:16:43 +01:00
Phillip Thelen
c04e8ea514 comma 2023-02-06 13:01:06 +01:00
Phillip Thelen
aec2409227 lint fixes 2023-02-06 12:59:54 +01:00
Phillip Thelen
87aebcc19e Merge branch 'apple_sub_fix' of https://github.com/HabitRPG/habitica into apple_sub_fix
# Conflicts:
#	test/api/unit/libs/payments/apple.test.js
#	website/server/libs/payments/subscriptions.js
2023-02-06 11:19:00 +01:00
Phillip Thelen
12479edb77 fix tests and some cases 2023-02-06 11:17:35 +01:00
Phillip Thelen
c0c6657536 handle upgrades and creations better 2023-02-06 11:17:35 +01:00
Phillip Thelen
82a1d6ff0e Improve handling 2023-02-06 11:17:35 +01:00
Phillip Thelen
64a3515c10 Add logic for different types of sub upgrades 2023-02-06 11:17:35 +01:00
Phillip Thelen
8dfa21a4b8 Add field to track when current subscription type started 2023-02-06 11:17:35 +01:00
Phillip Thelen
777f7887b4 fix lint errors 2023-02-06 11:17:35 +01:00
Phillip Thelen
f07d0f6441 Implement correct handling for when subs are up/downgraded 2023-02-06 11:17:24 +01:00
Phillip Thelen
21652c2670 fix tests and some cases 2022-12-02 17:12:17 +01:00
Phillip Thelen
d1ee679810 handle upgrades and creations better 2022-12-02 11:51:33 +01:00
Phillip Thelen
fae26a517d Improve handling 2022-11-30 15:06:50 +01:00
SabreCat
f1fa6a8456 Revert "Allow sub upgrades/downgrades on iOS (#14303)"
This reverts commit 9e98e56e9b.
2022-11-21 16:40:56 -06:00
SabreCat
f2aaee15f3 Merge branch 'release' into develop 2022-11-18 15:29:06 -06:00
SabreCat
15353eba8a fix(subs): roll all the way back, didn't work :( 2022-11-18 15:12:14 -06:00
SabreCat
febffb3f07 Revert "Fix double subscriptions, second attempt (#14345)"
This reverts commit 1a5cba57b7.
2022-11-18 14:26:49 -06:00
SabreCat
fdfa2d6df4 Merge branch 'release' into develop 2022-11-15 19:29:37 -06:00
Sabe Jones
1a5cba57b7 Fix double subscriptions, second attempt (#14345)
* fix(subscriptions): reject subs that come in too fast

* fix(lint): remove unused import

* fix(groups): individual subs may come rapidly

* fix(subscriptions): bad paren, handle rapid testing

* fix(test): reset dateUpdated between subs

* fix(test): one more block for dateUpdated

Co-authored-by: SabreCat <sabe@habitica.com>
2022-11-15 19:19:37 -06:00
Phillip Thelen
7d2529f5e1 Add logic for different types of sub upgrades 2022-11-09 19:49:53 +01:00
Phillip Thelen
8d732c59c4 Add field to track when current subscription type started 2022-11-08 12:38:24 +01:00
SabreCat
9b1a726875 Revert "feat(subs): allow upgrade/downgrade on iOS"
This reverts commit 27440772f0.
2022-11-02 09:00:29 -05:00
Phillip Thelen
9e98e56e9b Allow sub upgrades/downgrades on iOS (#14303)
* Allow sub upgrades/downgrades on iOS

* fix check

* fix(lint): line length

* fix(typo): customER

* fix tests

* Implement correct handling for when subs are up/downgraded

* fix lint errors

* fix test

Co-authored-by: SabreCat <sabe@habitica.com>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
2022-11-01 21:07:23 -05:00
SabreCat
27440772f0 feat(subs): allow upgrade/downgrade on iOS
by @phillipthelen
2022-11-01 20:53:04 -05:00
SabreCat
aea0be3245 fix(subs): establish lock to prevent race condition 2022-11-01 20:47:21 -05:00
negue
f7a03d2eb5 improve transactions logs + split createSubscription (#14289)
* improve transactions logs + split createSubscription
2022-10-27 08:39:06 +02:00
Sabe Jones
90250d1a25 Establish lock to avoid race scenario in subscriptions (#14267)
* fix(subscription): establish lock to avoid race scenario

* fix(lint): import syntax

* fix(lint): whitespace, dependency cycle

* fix(subs): skip locking on gifts and groups

* fix(subs): correctly reset _subSignature

* fix(sub): use findOneAndUpdate for unlock

* fix(test): save newly created user for some reason

Co-authored-by: SabreCat <sabe@habitica.com>
2022-10-25 16:44:33 -05:00
CuriousMagpie
d70dd2e6dd update: add analytics event upon group creation/upgrade (temp code & console.logs commented out) 2022-08-15 17:13:51 -04:00
Phillip Thelen
6e43d4dc79 Add Transaction log for gem and hourglass changes (#13589)
* Log all gem transactions to database

* Also store hourglass transactions

* Fix tests

* Display transaction history in hall of heroes for admins

* add tests to new API call

* hide transaction settings tab for non admins

* fix(lint): remove console

* fix(lint): various automatic corrections

* fix(transactions): use enum expected pluralizations

* fix api unit tests

* fix lint

* fix failing test

* Fix minor inconsistencies

* Log all gem transactions to database

* Also store hourglass transactions

* Fix tests

* Display transaction history in hall of heroes for admins

* add tests to new API call

* hide transaction settings tab for non admins

* fix(lint): remove console

* fix(lint): various automatic corrections

* fix(transactions): use enum expected pluralizations

* fix api unit tests

* fix lint

* Fix minor inconsistencies

Co-authored-by: Sabe Jones <sabrecat@gmail.com>
2022-01-31 15:36:15 -06:00
SabreCat
f2cfc2744d fix(Slack): improve subscription notif logic 2021-12-22 14:58:15 -06:00
SabreCat
391a9bd91b feat(promo): G1G1 2021
Also refactors a number of places on web client to start using event 
list from world state instead of singular currentEvent
2021-12-15 16:20:43 -06:00
Sabe Jones
9b719dc144 fix(subscriptions): handle future/prebuilt mystery items 2021-03-30 15:46:52 -05:00
Sabe Jones
2d5ddfdd87 fix(event): borken Gold gear
and default sub analytics to web
2021-01-08 13:10:45 -06:00
Sabe Jones
395e1c25d4 fix(g1g1): correct blank private message 2020-12-15 16:07:31 -06:00
Sabe Jones
f2b53f651e fix(subscriptions): don't save user during message send 2020-12-11 14:06:23 -06:00
Sabe Jones
0e1011b875 Revert "fix(subscriptions): avoid parallelSave from recursive fn call"
This reverts commit ff93dd9159.
2020-12-11 11:08:31 -06:00
Sabe Jones
ff93dd9159 fix(subscriptions): avoid parallelSave from recursive fn call 2020-12-10 19:22:54 -06:00
Sabe Jones
53f19c4da3 feat(event): Winter Wonderland 2021 and Gift-One-Get-One Promotion 2020-12-10 16:53:37 -06:00
Matteo Pagliazzi
7745a0e65a fix(analytics): always use mock service in development 2020-11-29 23:15:26 +01:00
Sabe Jones
708bd4a292 chore(analytics): track first-time-purchase info 2020-10-13 10:35:44 -05:00
Matteo Pagliazzi
46b5efcaf6 Allow group plans for private guilds only (#12479)
* 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
2020-08-21 11:46:09 +02:00
Bart Enkelaar
93335352ec Dont throw away extra paypal months (#12149)
* Issue 10605 - Don't pointlessly format dates

* fix(10605): Be defensive about setting plan termination dates
2020-05-05 17:16:35 +02:00
Matteo Pagliazzi
4fa381f153 Merge branch 'bugfix-extramonths-lost-when-subscription-terminated' of https://github.com/hamboomger/habitica into hamboomger-bugfix-extramonths-lost-when-subscription-terminated 2020-04-20 23:30:19 +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