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

MessagesSearch always returns messages as nil #1340

Open
pyxelpioneer opened this issue Mar 22, 2024 · 0 comments
Open

MessagesSearch always returns messages as nil #1340

pyxelpioneer opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@pyxelpioneer
Copy link

What version of gotd are you using?

github.com/gotd/td v0.99.1

Can this issue be reproduced with the latest version?

Yes

What did you do?

I am trying to get all the pinned messages in a peer.

Here is the code:

pinnedMessages, err := Client.API().MessagesSearch(ctx, &tg.MessagesSearchRequest{
            Peer: utils.PeerAsInputPeer(peer, accessHash),
            Filter: &tg.InputMessagesFilterPinned{},
})

if err != nil {
        log.Fatalf("Error: %v", err)
}

What did you expect to see?

I was expecting a list of messages that represents all the messages

What did you see instead?

It is null and on printing (json-ing) the value of pinnedMessages, i am getting:

{"Flags":0,"Inexact":false,"Count":1,"NextRate":0,"OffsetIDOffset":0,"Messages":null,"Chats":null,"Users":null}

I can confirm that I am getting correct amount of Count but why are the Messages null? Am i missing smth?

What Go version and environment are you using?

go version go1.22.0 linux/amd64

@pyxelpioneer pyxelpioneer added the bug Something isn't working label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant