@peopl-health/nexus 2.0.8 → 2.0.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.
@@ -4,7 +4,7 @@ const { INTERACTION_QUALITY_VALUES } = require('../config/interactionConfig');
4
4
  const { addRecord, getRecordByFilter } = require('../services/airtableService');
5
5
  const { Logging_ID } = require('../config/airtableConfig');
6
6
 
7
- async function logInteractionToAirtable(messageIds, whatsapp_id, voter_username) {
7
+ async function logInteractionToAirtable(messageIds, whatsapp_id, voter_username, description) {
8
8
  try {
9
9
  const messageObjects = await Message.find({ _id: { $in: messageIds } }).sort({ createdAt: -1 });
10
10
 
@@ -27,7 +27,8 @@ async function logInteractionToAirtable(messageIds, whatsapp_id, voter_username)
27
27
  const airtableData = {
28
28
  patient_id: patientId ? [patientId] : undefined,
29
29
  reporter: voter_username,
30
- conversation
30
+ conversation,
31
+ description
31
32
  };
32
33
 
33
34
  await addRecord(Logging_ID, 'interactions', airtableData);
@@ -50,7 +51,7 @@ const addInteractionController = async (req, res) => {
50
51
  }
51
52
  const interaction = await Interaction.create({ messages, whatsapp_id, voter_username, quality, description });
52
53
 
53
- logInteractionToAirtable(messages, whatsapp_id, voter_username).catch(err =>
54
+ logInteractionToAirtable(messages, whatsapp_id, voter_username, description).catch(err =>
54
55
  console.error('Background Airtable logging failed:', err)
55
56
  );
56
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",