diff --git a/src/steps/crm/akte/akte_sync_event_step.py b/src/steps/crm/akte/akte_sync_event_step.py index e9f55ae..9ae0dc8 100644 --- a/src/steps/crm/akte/akte_sync_event_step.py +++ b/src/steps/crm/akte/akte_sync_event_step.py @@ -636,6 +636,20 @@ async def _run_ragflow_sync( if not mime_type: mime_type = 'application/octet-stream' + # ── Dateityp-Filter: nur unterstützte MIME-Typen hochladen ────────── + is_eml = filename.lower().endswith('.eml') or mime_type == 'message/rfc822' + if not is_eml and mime_type not in RAGFlowService.SUPPORTED_MIME_TYPES: + ctx.logger.info( + f" ⏭️ Nicht unterstützter Dateityp ({mime_type}) – übersprungen" + ) + if not ragflow_doc_id: + await espocrm.update_entity('CDokumente', doc_id, { + 'aiSyncStatus': 'unsupported', + 'aiLastSync': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), + }) + skipped += 1 + continue + try: if ragflow_doc_id and not content_changed and meta_changed: # ── Nur Metadaten aktualisieren ───────────────────────────