feat: enrich AI stream with replyToMessageId, sourceGroupName, organizationId + tenant/source filters

- Extract quotedPlatformMsgId from Baileys contextInfo.stanzaId in normalizer
- Thread quotedPlatformMsgId through IngestJobData → ingest processor → Message record
- Widen ingest processor group/tenant selects to include name and organizationId
- Add replyToMessageId, sourceGroupName, organizationId to StreamMessagePayload and XADD
- Update StreamRecord, parseFields, and streamMessages in AI stream service with new fields
- Add optional ?tenant= and ?source= SSE filters; cursor advances for filtered entries
  so Last-Event-ID resume remains accurate across reconnects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 01:07:42 +05:30
parent 5a0f7aa58f
commit e598073dc7
7 changed files with 39 additions and 15 deletions
+1
View File
@@ -70,6 +70,7 @@ export interface IngestJobData {
content: string;
tags: string[];
effectiveAction?: 'FLAG' | 'AUTO_APPROVE' | 'SKIP' | 'REJECT' | 'P1';
quotedPlatformMsgId?: string;
}
export interface ForwardJobData {