tdlight-java
tdlight-java copied to clipboard
GetChatHistory not respecting offset int
Hey there @cavallium,
The offset is not doing anything for some reason. In an older version when I used a negative number it flipped the results order... and a positive number just breaks the call all together.
Can you take a look please or let me know how I'm using it wrong?
The expected behavior is with a -1 offset (or positive 1 idk) will skip the first message.
Thanks
GetChatHistory getHist = new GetChatHistory(chanID, 0, -1, 99, false); // what the fuck is going on here
client.send(getHist).thenAccept(messages -> {
if (messages instanceof Messages) {
Messages messageList = (Messages) messages;
for (TdApi.Message message : messageList.messages) {
//do stuff
}
}
});
Did you read this? https://tdlight-team.github.io/tdlight-docs/tdlight.api/it/tdlight/jni/TdApi.GetChatHistory.html