diff --git a/xmpp.go b/xmpp.go index 222d483..169bb0a 100644 --- a/xmpp.go +++ b/xmpp.go @@ -262,6 +262,9 @@ type Options struct { // MUST be a valid UUIDv4 UserAgentID string + // Enable XEP-0484: Fast Authentication Streamlining Tokens + Fast bool + // XEP-0484: Fast Authentication Streamlining Tokens // Fast Token FastToken string @@ -625,7 +628,7 @@ func (c *Client) init(o *Options) error { if o.UserAgentID != "" { userAgentID = fmt.Sprintf(" id='%s'", o.UserAgentID) } - if f.Authentication.Inline.Fast.Mechanism != nil && o.UserAgentID != "" && c.IsEncrypted() { + if o.Fast && f.Authentication.Inline.Fast.Mechanism != nil && o.UserAgentID != "" && c.IsEncrypted() { var mech string if o.FastToken == "" { m := f.Authentication.Inline.Fast.Mechanism