Export of Teams messages for a specific chat to the Frenfoil generic chat import format so that they can be imported into the Frenfoil history.
| 1 | // Export a Teams 1:1 chat in frenfoil's chat import format (chats.json + photos/, source "Teams"). |
| 2 | // See docs/CHAT-IMPORT-FORMAT.md in frenfoil. |
| 3 | // |
| 4 | // Restarts the new Teams desktop app with its WebView2 debug port open, borrows the auth headers Teams sends |
| 5 | // while it starts up, then fetches the chat and its images directly. |
| 6 | // |
| 7 | // Run again into a folder that holds an export to extend it: the chat is picked from its chats.json, only |
| 8 | // the last week before its newest message onward is fetched (--full for everything), and what Teams no |
| 9 | // longer has is kept. |
| 10 | // |