Fix field name in Presence struct

This commit is contained in:
Sergei
2023-07-29 22:39:38 -07:00
parent a21cf6d866
commit 84bd84a051

24
xmpp.go
View File

@@ -664,7 +664,7 @@ func (c *Client) init(o *Options) error {
c.domain = domain c.domain = domain
if o.Session { if o.Session {
//if server support session, open it // if server support session, open it
fmt.Fprintf(StanzaWriter, "<iq to='%s' type='set' id='%x'><session xmlns='%s'/></iq>", xmlEscape(domain), cookie, nsSession) fmt.Fprintf(StanzaWriter, "<iq to='%s' type='set' id='%x'><session xmlns='%s'/></iq>", xmlEscape(domain), cookie, nsSession)
} }
@@ -700,7 +700,7 @@ func (c *Client) startTLSIfRequired(f *streamFeatures, o *Options, domain string
tc := o.TLSConfig tc := o.TLSConfig
if tc == nil { if tc == nil {
tc = DefaultConfig.Clone() tc = DefaultConfig.Clone()
//TODO(scott): we should consider using the server's address or reverse lookup // TODO(scott): we should consider using the server's address or reverse lookup
tc.ServerName = domain tc.ServerName = domain
} }
t := tls.Client(c.conn, tc) t := tls.Client(c.conn, tc)
@@ -789,16 +789,16 @@ type Contact struct {
// Presence is an XMPP presence notification. // Presence is an XMPP presence notification.
type Presence struct { type Presence struct {
From string From string
To string To string
Type string Type string
Show string Show string
Status string Status string
Priority string Priority string
ID string ID string
Affilation string Affiliation string
Role string Role string
JID string JID string
} }
type IQ struct { type IQ struct {