(file: File | string)
| 90 | } |
| 91 | |
| 92 | async scanMultiChatFile(file: File | string): Promise<MultiChatEntry[]> { |
| 93 | if (typeof file === 'string') return [] |
| 94 | const form = new FormData() |
| 95 | form.append('file', file) |
| 96 | const res = await fetchWithAuth(`${getBaseUrl()}/scan-multi-chat`, { method: 'POST', body: form }) |
| 97 | if (!res.ok) return [] |
| 98 | const data = (await res.json()) as { chats: MultiChatEntry[] } |
| 99 | return data.chats |
| 100 | } |
| 101 | |
| 102 | async prepareImportSource(file: File | string): Promise<PreparedImportSourceResult> { |
| 103 | if (typeof file === 'string') { |
nothing calls this directly
no test coverage detected