diff options
author | Alexander <papatutuwawa@polynom.me> | 2021-02-17 21:30:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 21:30:06 +0100 |
commit | 763bb95ceadde6aa51ee72ff8a40407909823024 (patch) | |
tree | 31cadc6d00b87a9aaf2dcd54a2708c6b09f25c3b /bridge | |
parent | 668e7407e697d33751d24b84dfb98e23dd1ea260 (diff) | |
download | matterbridge-msglm-763bb95ceadde6aa51ee72ff8a40407909823024.tar.gz matterbridge-msglm-763bb95ceadde6aa51ee72ff8a40407909823024.tar.bz2 matterbridge-msglm-763bb95ceadde6aa51ee72ff8a40407909823024.zip |
Fix webhooks for channels with special characters (xmpp) (#1405)
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/xmpp/xmpp.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index b471326b..89a48742 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "net/http" + "net/url" "strings" "sync" "time" @@ -157,7 +158,7 @@ func (b *Bxmpp) postSlackCompatibleWebhook(msg config.Message) error { return err } - resp, err := http.Post(b.GetString("WebhookURL")+"/"+msg.Channel, "application/json", bytes.NewReader(webhookBody)) + resp, err := http.Post(b.GetString("WebhookURL")+"/"+url.QueryEscape(msg.Channel), "application/json", bytes.NewReader(webhookBody)) if err != nil { b.Log.Errorf("Failed to POST webhook: %s", err) return err |