diff --git a/api/src/chat/services/conversation.service.ts b/api/src/chat/services/conversation.service.ts index 7845427..1172c21 100644 --- a/api/src/chat/services/conversation.service.ts +++ b/api/src/chat/services/conversation.service.ts @@ -183,8 +183,10 @@ export class ConversationService extends BaseService< } //TODO: add check if nothing changed don't update + const criteria = + typeof convo.sender === 'object' ? convo.sender.id : convo.sender; - await this.subscriberService.updateOne(convo.sender, { + await this.subscriberService.updateOne(criteria, { context: profile.context, });