Merge pull request #297 from Hexastack/296-bug-persistence-contextvars-are-not-saved-in-subscriber

fix(api): persistence contextVars
This commit is contained in:
Med Marrouchi 2024-10-30 09:04:02 +01:00 committed by GitHub
commit 7d896b4ecd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,8 +183,10 @@ export class ConversationService extends BaseService<
} }
//TODO: add check if nothing changed don't update //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, context: profile.context,
}); });