lieer
lieer copied to clipboard
getProfile() for remote.get_current_history_id
Would it make sense for remote.get_current_history_id to be replaced with just:
return int(self.service.users().getProfile(userId = self.account).execute()['historyId'])
instead of doing what it current does (currently it first tries service.users.history.list passing startHistoryId, and if that doesn't work, for example if startHistoryId is not found, it retrieves one messages and takes the historyId from that)?
The reason i ask is that, like #203, with the current code i was caught in a "historyId is too old" loop, because apparently the historyId found from the first retrieved message is not always valid/current.
The reason i'm asking instead of submitting a patch is that i'm not sure i understand this very well.
Hm, yeah, that sounds reasonable. That is probably the correct way to get the latest historyId.