josefandersson

Joined 3 years ago

Last active 5 days ago

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.

0 0 1
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 --backtrack-days (default 7) before its newest message onward are fetched (--full for everything), and what Teams no
9 // longer has is kept. The new messages and their photos also go to a folder beside it,
10 // <outDir>-new-<UTC timestamp>, as an export of their own.