Added sorting of messages
This commit is contained in:
parent
6efd73a601
commit
0b10862320
@ -8,9 +8,18 @@
|
|||||||
let startTime = new Date();
|
let startTime = new Date();
|
||||||
if (history.messages.length > 0) {
|
if (history.messages.length > 0) {
|
||||||
notes = history.messages
|
notes = history.messages
|
||||||
.map((message) => `[${message.dateSent}] ${message.direction} : ${message.text}`)
|
.map(
|
||||||
|
(message) =>
|
||||||
|
`[${message.dateSent}] ${message.direction} : ${message.text}`
|
||||||
|
)
|
||||||
.filter((text) => text.trim() !== "");
|
.filter((text) => text.trim() !== "");
|
||||||
startTime = new Date(history.messages[0]?.dateSent || startTime);
|
startTime = new Date(history.messages[0]?.dateSent || startTime);
|
||||||
|
|
||||||
|
// reverse notes so that older messages are at the top
|
||||||
|
notes.reverse();
|
||||||
|
notes.forEach((note, index) => {
|
||||||
|
console.log(`Note ${index + 1}: ${note}`);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const endTime = new Date();
|
const endTime = new Date();
|
||||||
const url = `https://ivastudio.verint.live/organizations/${recognizedObject.classificationResults.organizationId}/workspaces/${conversationData.workspaceId}/conversation/${conversationData.id}`;
|
const url = `https://ivastudio.verint.live/organizations/${recognizedObject.classificationResults.organizationId}/workspaces/${conversationData.workspaceId}/conversation/${conversationData.id}`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user