(tempFile: string, targetSessionId: string | undefined, externalId: string)
| 91 | } |
| 92 | |
| 93 | async importFile(tempFile: string, targetSessionId: string | undefined, externalId: string): Promise<ImportResult> { |
| 94 | if (targetSessionId && this.sessionExists(targetSessionId)) { |
| 95 | return this.incrementalImportFile(targetSessionId, tempFile) |
| 96 | } |
| 97 | |
| 98 | if (targetSessionId) { |
| 99 | this.logger.info(`[DirectImporter] Session ${targetSessionId} not found locally, need full resync`) |
| 100 | return { success: false, newMessageCount: 0, needFullResync: true } |
| 101 | } |
| 102 | |
| 103 | return this.fullImportFile(tempFile, externalId) |
| 104 | } |
| 105 | |
| 106 | private async incrementalImportFile(sessionId: string, tempFile: string): Promise<ImportResult> { |
| 107 | try { |
nothing calls this directly
no test coverage detected