chore: update live chat and work server changes
This commit is contained in:
@@ -1083,12 +1083,8 @@ export async function updateChatConversationContext(
|
||||
client_id: normalizedClientId || current.client_id || null,
|
||||
chat_type_id: nextChatTypeId,
|
||||
last_chat_type_id: nextChatTypeId || payload.lastChatTypeId?.trim() || current.last_chat_type_id || null,
|
||||
context_label:
|
||||
currentChatTypeId != null ? current.context_label || null : requestedContextLabel || current.context_label || null,
|
||||
context_description:
|
||||
currentChatTypeId != null
|
||||
? current.context_description || null
|
||||
: requestedContextDescription || current.context_description || null,
|
||||
context_label: resolveNextConversationContextValue(current.context_label, requestedContextLabel),
|
||||
context_description: resolveNextConversationContextValue(current.context_description, requestedContextDescription),
|
||||
notify_offline:
|
||||
normalizedClientId == null && payload.notifyOffline != null
|
||||
? payload.notifyOffline
|
||||
@@ -1109,6 +1105,12 @@ export function resolveNextConversationChatTypeId(currentChatTypeId?: string | n
|
||||
return normalizedRequestedChatTypeId ?? normalizedCurrentChatTypeId ?? null;
|
||||
}
|
||||
|
||||
export function resolveNextConversationContextValue(currentValue?: string | null, requestedValue?: string | null) {
|
||||
const normalizedRequestedValue = String(requestedValue ?? '').trim() || null;
|
||||
const normalizedCurrentValue = String(currentValue ?? '').trim() || null;
|
||||
return normalizedRequestedValue ?? normalizedCurrentValue ?? null;
|
||||
}
|
||||
|
||||
export async function listChatConversations(
|
||||
clientId?: string | null,
|
||||
limit = 50,
|
||||
|
||||
Reference in New Issue
Block a user