hangupsjs icon indicating copy to clipboard operation
hangupsjs copied to clipboard

Send timestamp in syncrecentconversations

Open timvdalen opened this issue 8 years ago • 2 comments

It seems like conversations/syncrecentconversations can accept a timestamp (in microseconds), which allows you to grab older conversations.

It would be great if the syncrecentconversations call could take this argument. The timestamp is at index 1 of the request payload.

I'll see if I can make something work in the library.

timvdalen avatar Apr 25 '16 12:04 timvdalen

Adding the timestamp as a second argument here: https://github.com/algesten/hangupsjs/blob/master/src/client.coffee#L467 seems to work. The gmail web client sends null for the first request, so that could be a default parameter.

Since the converstation state also returns timestamps for each of the converstations, a higher level 'find all converstations' function could be implemented by just repeating the request for older timestamps until the result is empty (although I think there's some way to tell if a request is the last one, since the gmail web client never makes a request which turns out to be empty).

timvdalen avatar Apr 25 '16 13:04 timvdalen

Just checked yakyak/yakyak, that also only shows the limited results

timvdalen avatar Apr 25 '16 20:04 timvdalen