fix(api): sync stripe customer email on change (#3243)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-06 21:38:25 +02:00
1 parent 6e28092cdc
commit cc5545c333
17 files changed
+509 -125

No files matched your search

@@ -14,6 +14,7 @@ import {Logger} from '@app/api/Logger';
import type {LimitConfigService} from '@app/api/limits/LimitConfigService';
import type {AuthSession} from '@app/api/models/AuthSession';
import type {User} from '@app/api/models/User';
import {enqueueStripeCustomerEmailSync} from '@app/api/stripe/StripeCustomer';
import type {IUserAccountRepository} from '@app/api/user/repositories/IUserAccountRepository';
import type {IUserChannelRepository} from '@app/api/user/repositories/IUserChannelRepository';
import type {IUserRelationshipRepository} from '@app/api/user/repositories/IUserRelationshipRepository';
@@ -182,6 +183,7 @@ export class UserAccountService {
reason: 'user_requested',
actorUserId: user.id,
}),
() => enqueueStripeCustomerEmailSync(this.apiContext.services.worker, user, updatedUser),
async () => {
try {
await this.profileService.commitAssetChanges(profileResult);