From 8d2ce56c37f3634c185327cd73d360fd02cd13d7 Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 5 Mar 2018 20:19:43 +0100 Subject: Fix regression (slack). Closes #384 --- bridge/rocketchat/rocketchat.go | 3 +-- bridge/slack/slack.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bridge/rocketchat/rocketchat.go b/bridge/rocketchat/rocketchat.go index fa2c31d7..31de933f 100644 --- a/bridge/rocketchat/rocketchat.go +++ b/bridge/rocketchat/rocketchat.go @@ -53,8 +53,7 @@ func (b *Brocketchat) Send(msg config.Message) (string, error) { b.Log.Debugf("=> Receiving %#v", msg) if msg.Extra != nil { for _, rmsg := range helper.HandleExtra(&msg, b.General) { - matterMessage := matterhook.OMessage{IconURL: b.GetString("IconURL"), Channel: rmsg.Channel, UserName: rmsg.Username, - Text: rmsg.Text} + matterMessage := matterhook.OMessage{IconURL: b.GetString("IconURL"), Channel: rmsg.Channel, UserName: rmsg.Username, Text: rmsg.Text} b.mh.Send(matterMessage) } if len(msg.Extra["file"]) > 0 { diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index c7c2fac8..4d128415 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -256,11 +256,11 @@ func (b *Bslack) handleSlack() { b.Log.Debugf("<= Sending message from %s on %s to gateway", message.Username, b.Account) // cleanup the message - message.Text = b.replaceURL(message.Text) - message.Text = html.UnescapeString(message.Text) message.Text = b.replaceMention(message.Text) message.Text = b.replaceVariable(message.Text) message.Text = b.replaceChannel(message.Text) + message.Text = b.replaceURL(message.Text) + message.Text = html.UnescapeString(message.Text) // Add the avatar message.Avatar = b.getAvatar(message.Username) -- cgit v1.2.3