Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetChatHistory not respecting offset int #212

Open
robzsaunders opened this issue Apr 10, 2024 · 1 comment
Open

GetChatHistory not respecting offset int #212

robzsaunders opened this issue Apr 10, 2024 · 1 comment

Comments

@robzsaunders
Copy link

robzsaunders commented Apr 10, 2024

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
                    }
                }
            });
@robzsaunders robzsaunders changed the title GetChatHistory only grabbing 10-11 messages and not respecting offset int GetChatHistory not respecting offset int Apr 10, 2024
@cavallium
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants