precompute call waveforms and stop list-time audio loading
This commit is contained in:
@@ -633,6 +633,9 @@ async function getCommunications(auth: AuthContext | null) {
|
||||
text: m.content,
|
||||
audioUrl: resolveContactMessageAudioUrl(m),
|
||||
duration: m.durationSec ? new Date(m.durationSec * 1000).toISOString().slice(14, 19) : "",
|
||||
waveform: Array.isArray(m.waveformJson)
|
||||
? m.waveformJson.map((value) => Number(value)).filter((value) => Number.isFinite(value))
|
||||
: [],
|
||||
transcript: Array.isArray(m.transcriptJson) ? ((m.transcriptJson as any) as string[]) : [],
|
||||
deliveryStatus: resolveDeliveryStatus(m),
|
||||
}));
|
||||
@@ -953,6 +956,9 @@ async function getClientTimeline(auth: AuthContext | null, contactIdInput: strin
|
||||
text: m.content,
|
||||
audioUrl: resolveContactMessageAudioUrl(m),
|
||||
duration: m.durationSec ? new Date(m.durationSec * 1000).toISOString().slice(14, 19) : "",
|
||||
waveform: Array.isArray(m.waveformJson)
|
||||
? m.waveformJson.map((value) => Number(value)).filter((value) => Number.isFinite(value))
|
||||
: [],
|
||||
transcript: Array.isArray(m.transcriptJson) ? ((m.transcriptJson as any) as string[]) : [],
|
||||
deliveryStatus: resolveDeliveryStatus(m),
|
||||
},
|
||||
@@ -2014,6 +2020,7 @@ export const crmGraphqlSchema = buildSchema(`
|
||||
text: String!
|
||||
audioUrl: String!
|
||||
duration: String!
|
||||
waveform: [Float!]!
|
||||
transcript: [String!]!
|
||||
deliveryStatus: String
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user