refactor(chat): simplify paid message lock state
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user