From e9123cc4b3f1237ff98935d68647c1460a4c6f39 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sat, 11 May 2024 15:05:41 +0200 Subject: [PATCH] Make use of FAST configurable. --- xmpp.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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