Closed mildsunrise closed 7 years ago
Wonderful! This is what I wanted to do after reviewing #61 but lacked the time for, and is probably implemented better than I would have managed. If an outsider were to look at the diff it may look like a bunch of trivial changes, but getting this kind of thing right is tricky and takes effort. I looked through the changes and can't find any problems with it, so I'll merge it right away.
Wow, awesome!
Reimplementation of #61. I reviewed the changes, looked at each note. This contains additional changes for convenience. Summary (look at each commit's description for details):
[X] https://github.com/tvdstaaij/telegram-history-dump/commit/6a28e0de3e6ab14cf46c79fa79479679bdf6143e: Little fix for code that caused media timeouts to abort the whole chat.
[X] https://github.com/tvdstaaij/telegram-history-dump/commit/b7ace13f5a327b10768489b5e192ef7be98418be: If media download fails,
media
attribute will be set tonull
to explicitely indicate it in the output.[X] https://github.com/tvdstaaij/telegram-history-dump/commit/b7ace13f5a327b10768489b5e192ef7be98418be: Detect invalid media responses from
telegram-cli
instead of crashing.[x] https://github.com/tvdstaaij/telegram-history-dump/commit/ec7bb958a062a41470c531ea2bcf80c56feac8ed: Detect invalid chunks returned by
telegram-cli
instead of crashing.Minor changes (not affecting behaviour):
[X] https://github.com/tvdstaaij/telegram-history-dump/commit/eb1a091a30b6192e795e19805c7492d45236fa28: This allows piping
telegram-history-dump
to another program.[X] https://github.com/tvdstaaij/telegram-history-dump/commit/a48a2eb6f7052591139ad5c3aa891fdeddf51c79: Turn some non-fatal errors into warnings.
[X] https://github.com/tvdstaaij/telegram-history-dump/commit/6e655f8f0ec2e31b15275518349f9744f5c63148: Change default config to enable media download timeout, now that it works as intended.
I'm aware this is quite a bunch of changes; I've tried to keep them simple and minimal but I'm open to changing or dropping some if you're not okay with them.