Try removing decoder from IQ tests and changing writing method

This commit is contained in:
CORNIERE Rémi
2019-12-09 13:31:01 +01:00
parent e675e65a59
commit 6d8e9d325a
3 changed files with 21 additions and 12 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"encoding/xml"
"errors"
"fmt"
"io"
"net"
"time"
@@ -200,7 +199,7 @@ func (c *Client) Resume(state SMState) error {
//fmt.Fprintf(client.conn, "<presence xml:lang='en'><show>%s</show><status>%s</status></presence>", "chat", "Online")
// TODO: Do we always want to send initial presence automatically ?
// Do we need an option to avoid that or do we rely on client to send the presence itself ?
_, err = fmt.Fprintf(c.transport, "<presence/>")
err = c.sendWithWriter(c.transport, []byte("<presence/>"))
return err
}