From 9161feef4de7c6ac794d70a70d1d2c2a0a85e525 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Fri, 12 Apr 2024 17:27:33 +0200 Subject: [PATCH] FAST: Check that connection is encrypted. --- xmpp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp.go b/xmpp.go index ed280fa..d50d7cd 100644 --- a/xmpp.go +++ b/xmpp.go @@ -621,7 +621,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 != "" { + if f.Authentication.Inline.Fast.Mechanism != nil && o.UserAgentID != "" && c.IsEncrypted() { var mech string if o.FastToken == "" { m := f.Authentication.Inline.Fast.Mechanism