shuttlepro-shared 1.4.28 → 1.4.30
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.
|
@@ -243,6 +243,18 @@ class CallRepository {
|
|
|
243
243
|
return query.exec();
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
async addCallHistory(callId, historyData = {}) {
|
|
247
|
+
const entry = historyData;
|
|
248
|
+
return this._safeExec(
|
|
249
|
+
Call.findOneAndUpdate(
|
|
250
|
+
{ callId },
|
|
251
|
+
{ $push: { callHistory: entry } },
|
|
252
|
+
{ new: true }
|
|
253
|
+
),
|
|
254
|
+
`Failed to add call history for ${callId}`
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
246
258
|
getCallsByAgent(
|
|
247
259
|
agentId,
|
|
248
260
|
{
|
package/config/socket.js
CHANGED