Add conversations router support for custom middleware. the custom middleware has access to the ConversationsService instance and can add custom data to endpoints with the Response.locals object.
Refactor conversations service and database to store ip address and origin in customData fields
Add conversations router createConversationCustomData and addMessageToConversationCustomData functions that add custom data to the database
export middleware dir to package level
add configurable conversationConstants to ConversationsService
Small breaking change to the conversations database collection. removed ip address from the Conversation object. instead it's not a requirement of the core functionality, but you can store it inside the Conversation.customData object. it is stored there by default.
Jira: https://jira.mongodb.org/browse/EAI-138
Changes
ConversationsService
instance and can add custom data to endpoints with theResponse.locals
object.customData
fieldscreateConversationCustomData
andaddMessageToConversationCustomData
functions that add custom data to the databasemiddleware
dir to package levelConversationsService
conversations
database collection. removedip
address from the Conversation object. instead it's not a requirement of the core functionality, but you can store it inside the Conversation.customData object. it is stored there by default.Notes
-
Todos
requireValidIpAddress.ts