@peopl-health/nexus 6.5.8 → 6.5.9
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.
|
@@ -73,7 +73,7 @@ async function removeUnseen(seen, startedAt) {
|
|
|
73
73
|
|
|
74
74
|
async function syncPatientProfiles({ now = new Date() } = {}) {
|
|
75
75
|
const state = await readState();
|
|
76
|
-
const empty = (await getPatientProfile().
|
|
76
|
+
const empty = !(await getPatientProfile().exists({}));
|
|
77
77
|
const reconcile = empty || !state.watermark || !state.fullReconciledAt || now - new Date(state.fullReconciledAt) >= RECONCILE_MS;
|
|
78
78
|
let rows;
|
|
79
79
|
try {
|
|
@@ -26,7 +26,7 @@ const getConversationController = async (req, res) => {
|
|
|
26
26
|
const skip = (page - 1) * limit;
|
|
27
27
|
const filter = req.query.filter || 'all';
|
|
28
28
|
|
|
29
|
-
if (!Message || await
|
|
29
|
+
if (!Message || !(await getMessages({}, { select: '_id', limit: 1 })).length) {
|
|
30
30
|
return res.status(200).json({
|
|
31
31
|
success: true,
|
|
32
32
|
conversations: [],
|