forked from jshiffer/go-xmpp
Make use of FAST configurable.
This commit is contained in:
parent
4be597a84a
commit
e9123cc4b3
5
xmpp.go
5
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
|
||||
|
Loading…
Reference in New Issue
Block a user