yakyak / hangupsjs

google hangouts client library for nodejs
226 stars 46 forks source link

Parse timestamps as numbers #119

Closed HomerSp closed 3 years ago

HomerSp commented 3 years ago

Google seem to have recently started sending the timestamps as strings instead of numbers, this causes issues in yakyak because it depends on them being numbers. For example, the unread counter no longer works for me. This PR fixes that by adding a new NumberField class to pblite that calls parseInt on the input. Only a few of the timestamp fields are actually used, but to avoid issues I updated all of them to use the new NumberField class.