summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-07-31 17:17:43 +0200
committerGitHub <noreply@github.com>2021-07-31 17:17:43 +0200
commit9efcc41ab23aaabb935ad18cbb4122579a27a728 (patch)
tree5281b7a21c3752948ca2d3fdb86c22187cc2b271 /vendor
parent13bbeeaceb7bc2ad27c48deeff7a3536604564d5 (diff)
downloadmatterbridge-msglm-9efcc41ab23aaabb935ad18cbb4122579a27a728.tar.gz
matterbridge-msglm-9efcc41ab23aaabb935ad18cbb4122579a27a728.tar.bz2
matterbridge-msglm-9efcc41ab23aaabb935ad18cbb4122579a27a728.zip
Update matterbridge/go-xmpp vendor (#1559)
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/matterbridge/go-xmpp/xmpp.go10
-rw-r--r--vendor/modules.txt2
2 files changed, 9 insertions, 3 deletions
diff --git a/vendor/github.com/matterbridge/go-xmpp/xmpp.go b/vendor/github.com/matterbridge/go-xmpp/xmpp.go
index 56b08f5b..5b8cdcf7 100644
--- a/vendor/github.com/matterbridge/go-xmpp/xmpp.go
+++ b/vendor/github.com/matterbridge/go-xmpp/xmpp.go
@@ -335,13 +335,19 @@ func (c *Client) init(o *Options) error {
var domain string
var user string
a := strings.SplitN(o.User, "@", 2)
- if len(o.User) > 0 {
+ // Check if User is not empty. Otherwise, we'll be attempting ANONYMOUS with Host domain.
+ switch {
+ case len(o.User) > 0:
if len(a) != 2 {
return errors.New("xmpp: invalid username (want user@domain): " + o.User)
}
user = a[0]
domain = a[1]
- } // Otherwise, we'll be attempting ANONYMOUS
+ case strings.Contains(o.Host, ":"):
+ domain = strings.SplitN(o.Host, ":", 2)[0]
+ default:
+ domain = o.Host
+ }
// Declare intent to be a jabber client and gather stream features.
f, err := c.startStream(o, domain)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 4a06f74f..cf3904db 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -146,7 +146,7 @@ github.com/matterbridge/Rocket.Chat.Go.SDK/rest
# github.com/matterbridge/discordgo v0.21.2-0.20210201201054-fb39a175b4f7
## explicit
github.com/matterbridge/discordgo
-# github.com/matterbridge/go-xmpp v0.0.0-20200418225040-c8a3a57b4050
+# github.com/matterbridge/go-xmpp v0.0.0-20210731150933-5702291c239f
## explicit
github.com/matterbridge/go-xmpp
# github.com/matterbridge/gozulipbot v0.0.0-20200820220548-be5824faa913