refactor(chat): simplify paid message lock state

This commit is contained in:
2026-07-13 15:20:07 +08:00
parent fd631168c8
commit 4682b4bf3f
17 changed files with 86 additions and 190 deletions
-8
View File
@@ -24,11 +24,7 @@ export interface SentencePayload {
export interface PaywallStatusPayload {
locked: boolean;
showContent: boolean;
showUpgrade: boolean;
reason: string | null;
hint: string | null;
detail: Record<string, unknown> | null;
}
export class ChatWebSocket {
@@ -178,11 +174,7 @@ export class ChatWebSocket {
const lockDetail = payload.data?.lockDetail;
this.onPaywallStatus?.({
locked: lockDetail?.locked ?? false,
showContent: lockDetail?.showContent ?? true,
showUpgrade: lockDetail?.showUpgrade ?? false,
reason: lockDetail?.reason ?? null,
hint: lockDetail?.hint ?? null,
detail: lockDetail?.detail ?? null,
});
break;
}