go-xmpp icon indicating copy to clipboard operation
go-xmpp copied to clipboard

Empty chat record on Recv

Open gatlin opened this issue 13 years ago • 4 comments

I am using a slightly modified version of your example code (go-iconv doesn't work on my version of Mac OS X but github.com/djimenez/iconv-go does work => my UTF8 conversion functions are slightly different). I can send messages just fine and I can produce some kind of output every time I receive one but the chat record itself is empty. I verified this with

go func() {
    for {
        chat, err := talk.Recv()
        if err != nil {
            log.Fatal(err)
            fmt.Printf("Trouble receiving chat\n")
        }
        fmt.Printf("%v\n", chat)
    }
}()

And I receive { } for each message. Connecting to google talk servers.

gatlin avatar Jun 16 '12 03:06 gatlin

I changed the beginning of init to c.p = xml.NewDecoder(tee{c.tls, os.Stdout}); which caused raw XML stanzas to be printed. By doing this I verified that the stanzas are in fact being sent and received correctly at a lower level. It's just that next isn't producing the clientMessage struct correctly. I'm a bit new to Go so I can't tell for sure but it must have something to do with the reflection code.

gatlin avatar Jun 16 '12 07:06 gatlin

@gatlin is this still an issue?

mdosch avatar Mar 28 '24 15:03 mdosch

@mdosch I will reinstall Go and let you know asap!

gatlin avatar Mar 28 '24 18:03 gatlin

Thanks. :)

On 28.03.2024 11:20, Gatlin Johnson wrote:

@mdosch I will reinstall Go and let you know asap!

-- Reply to this email directly or view it on GitHub: https://github.com/xmppo/go-xmpp/issues/13#issuecomment-2025840870 You are receiving this because you were mentioned.

Message ID: @.***>

mdosch avatar Mar 28 '24 18:03 mdosch

Just now I realized that this issue was about using "google talk", as "google talk" went to where all google chat services go long ago I'm going to close this issue.

mdosch avatar Oct 03 '24 15:10 mdosch