diff options
author | Steinar H. Gunderson <steinar+github@gunderson.no> | 2023-10-06 00:31:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-06 00:31:06 +0200 |
commit | 1f9f89c778708698070e9cba639f2c53dec23490 (patch) | |
tree | 4403bec3354880b2010338593368de02130daf00 /_pytest/data/websocket/1486004935.63-presence_change.json | |
parent | bc1c2b6373a999c671a32f6f3d20146bbd90109c (diff) | |
download | wee-slack-1f9f89c778708698070e9cba639f2c53dec23490.tar.gz |
Handle millisecond-level timestamps in attachments (#905)
The Slack documentation claims that the “ts” flag on attachments
is “An integer Unix timestamp”. However, evidently it can be in
milliseconds (i.e., a timestamp multiplied by 1000), causing
out-of-range exceptions when trying to feed them to date.fromtimestamp().
This can cause all messages after such attachments to just vanish,
as if they were never there, as parsing stops.
Accept both; as a heuristic, the Slack web interface seems to use
100000000000 as a threshold, so we do the same and divide by 1000
if so.
Co-authored-by: Steinar H. Gunderson <steinar+git@gunderson.no>
Diffstat (limited to '_pytest/data/websocket/1486004935.63-presence_change.json')
0 files changed, 0 insertions, 0 deletions