Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

refactor(api): rename the refund date, drop the unclaimed check

Hampusebc1514882dd
diff --git a/fluxer_api/src/api/models/User.ts b/fluxer_api/src/api/models/User.ts
index 10eae73f7..8695b5636 100644
--- a/fluxer_api/src/api/models/User.ts
+++ b/fluxer_api/src/api/models/User.ts
@@ -10,7 +10,6 @@ import {
type UserAuthenticatorType,
type UserPremiumType,
} from '@fluxer/constants/src/UserConstants';
-import {types} from 'cassandra-driver';
export class User {
readonly id: UserID;
@@ -69,7 +68,7 @@ export class User {
readonly contentHiddenSince: Date | null;
readonly acls: Set<string>;
private readonly _traits: Set<string>;
- readonly firstRefundAt: Date | null;
+ readonly lastRefundAt: Date | null;
readonly giftInventoryServerSeq: number | null;
readonly giftInventoryClientSeq: number | null;
readonly premiumOnboardingDismissedAt: Date | null;
@@ -135,7 +134,7 @@ export class User {
this.contentHiddenSince = row.content_hidden_since ?? null;
this.acls = row.acls ?? new Set();
this._traits = row.traits ?? new Set();
- this.firstRefundAt = row.first_refund_at ?? null;
+ this.lastRefundAt = row.first_refund_at ?? null;
this.giftInventoryServerSeq = row.gift_inventory_server_seq ?? null;
this.giftInventoryClientSeq = row.gift_inventory_client_seq ?? null;
this.premiumOnboardingDismissedAt = row.premium_onboarding_dismissed_at ?? null;
@@ -156,10 +155,6 @@ export class User {
return getEffectivePremiumUntil(this);
}
- isUnclaimedAccount(): boolean {
- return this.passwordHash === null && !this.isBot && !this._traits.has('sso');
- }
-
toRow(): UserRow {
return {
user_id: this.id,
@@ -218,7 +213,7 @@ export class User {
content_hidden_since: this.contentHiddenSince,
acls: this.acls.size > 0 ? this.acls : null,
traits: this._traits.size > 0 ? this._traits : null,
- first_refund_at: this.firstRefundAt,
+ first_refund_at: this.lastRefundAt,
gift_inventory_server_seq: this.giftInventoryServerSeq,
gift_inventory_client_seq: this.giftInventoryClientSeq,
premium_onboarding_dismissed_at: this.premiumOnboardingDismissedAt,