genPostData should use a different timestamp from storageHash.oldestTimestamp when getOlderMessages = True.
See original GitHub issueCurrently IITC uses the stored oldest timestamp of received messages as the maxTimestampMs
in the data
for retrieving messages when getOlderMessages
is true
.
data = $.extend(data, {maxTimestampMs: storageHash.oldestTimestamp});
However, where a single request results in 50+ (or a large value, unknown specific) messages all at the same time, say when a heavily layered field set is destroyed, this means that the first request sets the oldestTimestamp to that time, but every subsequent request keeps requesting the same time period.
Since the chat never receives older messages, it logjams at this timestamp and won’t display any earlier entries.
Suggested Solution:
Use the timestamp of the oldestTimestamp minus one millisecond. Since Niantic uses end inclusive timestamps in their request, you need to shift the end timestamp back by one millisecond or you will continue to receive the same data over and over.
data = $.extend(data, {maxTimestampMs: storageHash.oldestTimestamp - 1});
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (9 by maintainers)
@Looka13
Thank you for this investigation!
@johnd0e Thank you and all the other developers who works on such an important tool as it is IITC!