Retorna status da maquina mesmo sem sessao de chat ativa

A query getTicketSession agora sempre retorna machineOnline,
permitindo que o botao de chat seja habilitado corretamente
quando a maquina esta online mas nao ha sessao ativa.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
esdrasrenan 2025-12-07 02:54:56 -03:00
parent 0bd9e993d5
commit 60e98dd47c
2 changed files with 20 additions and 11 deletions

View file

@ -322,11 +322,11 @@ export function TicketSummaryHeader({ ticket }: TicketHeaderProps) {
? { ticketId: ticket.id as Id<"tickets">, viewerId: convexUserId as Id<"users"> }
: "skip"
) as {
sessionId: Id<"liveChatSessions">
agentId: Id<"users">
sessionId: Id<"liveChatSessions"> | null
agentId: Id<"users"> | null
agentName: string | null
startedAt: number
lastActivityAt: number
startedAt: number | null
lastActivityAt: number | null
unreadByAgent: number
machineOnline: boolean
} | null | undefined