@bty/customer-service-cli 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +2 -12
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1462,20 +1462,10 @@ function recordsToMsgList(records) {
|
|
|
1462
1462
|
const offset = nowSec - maxOriginal;
|
|
1463
1463
|
return records.map((r, i) => {
|
|
1464
1464
|
const context = r.context ?? {};
|
|
1465
|
-
const text = context.text ?? "";
|
|
1466
|
-
const imageUrl = context.image_url ?? context.image;
|
|
1467
|
-
const url = context.url;
|
|
1468
1465
|
const content = {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
email: `${r.conversation_id}@gmail.com`
|
|
1466
|
+
...context,
|
|
1467
|
+
email: context.email || `${r.conversation_id}@gmail.com`
|
|
1472
1468
|
};
|
|
1473
|
-
if (url) {
|
|
1474
|
-
content.url = url;
|
|
1475
|
-
}
|
|
1476
|
-
if (imageUrl) {
|
|
1477
|
-
content.image = imageUrl;
|
|
1478
|
-
}
|
|
1479
1469
|
const timestamp = originalTimestamps[i] + offset;
|
|
1480
1470
|
return {
|
|
1481
1471
|
match_id: r.record_id ?? `match_${timestamp}_${Math.floor(Math.random() * 100)}`,
|