Google Hangouts chat doesn't have time in the regular header, but only in the email._from header. This change falls back to the date in _from when the usual one is absent, and it includes the Hangouts chat ID in the "To" field (when there is nothing else there) so that the chats can be assembled into conversations. The regular "From" header is informative about chat.
Here's an example chat record:
From 6803175121078017139@xxx Thu May 28 15:08:30 +0000 2020
X-GM-THRID: 8689061491205804398
X-Gmail-Labels: lorem,ipsum
From: Jim Scarborough <ke4roh@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Lorem ipsum dolor st amit
Google Hangouts chat doesn't have time in the regular header, but only in the email._from header. This change falls back to the date in _from when the usual one is absent, and it includes the Hangouts chat ID in the "To" field (when there is nothing else there) so that the chats can be assembled into conversations. The regular "From" header is informative about chat.
Here's an example chat record: