check that purchase token is also the same

This commit is contained in:
Phillip Thelen
2026-06-09 13:57:40 +02:00
parent 3915b04aed
commit 2baca238b2
+1 -1
View File
@@ -164,7 +164,7 @@ api.subscribe = async function subscribe (
let existingSub;
if (user && user.isSubscribed()) {
existingSub = shared.content.subscriptionBlocks[user.purchased.plan.planId];
if (existingSub === sub) {
if (existingSub === sub && user.purchased.plan.customerId === token) {
throw new NotAuthorized(this.constants.RESPONSE_ALREADY_USED);
}
}