feat(chat): unlock paid messages before payment
This commit is contained in:
@@ -32,6 +32,10 @@ interface ChatState {
|
||||
lockedHistoryCount: number;
|
||||
isUnlockingHistory: boolean;
|
||||
unlockHistoryError: string | null;
|
||||
isUnlockingMessage: boolean;
|
||||
unlockingMessageId: string | null;
|
||||
unlockMessageError: string | null;
|
||||
unlockPaywallRequest: MachineContext["unlockPaywallRequest"];
|
||||
}
|
||||
|
||||
const ChatStateCtx = createContext<ChatState | null>(null);
|
||||
@@ -59,6 +63,10 @@ export function ChatProvider({ children }: ChatProviderProps) {
|
||||
lockedHistoryCount: state.context.lockedHistoryCount,
|
||||
isUnlockingHistory: state.context.isUnlockingHistory,
|
||||
unlockHistoryError: state.context.unlockHistoryError,
|
||||
isUnlockingMessage: state.context.isUnlockingMessage,
|
||||
unlockingMessageId: state.context.unlockingMessageId,
|
||||
unlockMessageError: state.context.unlockMessageError,
|
||||
unlockPaywallRequest: state.context.unlockPaywallRequest,
|
||||
}),
|
||||
[state],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user