mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-26 02:01:36 +00:00
Fix regression (slack). Closes #384
This commit is contained in:
parent
1ec324354b
commit
8d2ce56c37
@ -53,8 +53,7 @@ func (b *Brocketchat) Send(msg config.Message) (string, error) {
|
|||||||
b.Log.Debugf("=> Receiving %#v", msg)
|
b.Log.Debugf("=> Receiving %#v", msg)
|
||||||
if msg.Extra != nil {
|
if msg.Extra != nil {
|
||||||
for _, rmsg := range helper.HandleExtra(&msg, b.General) {
|
for _, rmsg := range helper.HandleExtra(&msg, b.General) {
|
||||||
matterMessage := matterhook.OMessage{IconURL: b.GetString("IconURL"), Channel: rmsg.Channel, UserName: rmsg.Username,
|
matterMessage := matterhook.OMessage{IconURL: b.GetString("IconURL"), Channel: rmsg.Channel, UserName: rmsg.Username, Text: rmsg.Text}
|
||||||
Text: rmsg.Text}
|
|
||||||
b.mh.Send(matterMessage)
|
b.mh.Send(matterMessage)
|
||||||
}
|
}
|
||||||
if len(msg.Extra["file"]) > 0 {
|
if len(msg.Extra["file"]) > 0 {
|
||||||
|
@ -256,11 +256,11 @@ func (b *Bslack) handleSlack() {
|
|||||||
b.Log.Debugf("<= Sending message from %s on %s to gateway", message.Username, b.Account)
|
b.Log.Debugf("<= Sending message from %s on %s to gateway", message.Username, b.Account)
|
||||||
|
|
||||||
// cleanup the message
|
// cleanup the message
|
||||||
message.Text = b.replaceURL(message.Text)
|
|
||||||
message.Text = html.UnescapeString(message.Text)
|
|
||||||
message.Text = b.replaceMention(message.Text)
|
message.Text = b.replaceMention(message.Text)
|
||||||
message.Text = b.replaceVariable(message.Text)
|
message.Text = b.replaceVariable(message.Text)
|
||||||
message.Text = b.replaceChannel(message.Text)
|
message.Text = b.replaceChannel(message.Text)
|
||||||
|
message.Text = b.replaceURL(message.Text)
|
||||||
|
message.Text = html.UnescapeString(message.Text)
|
||||||
|
|
||||||
// Add the avatar
|
// Add the avatar
|
||||||
message.Avatar = b.getAvatar(message.Username)
|
message.Avatar = b.getAvatar(message.Username)
|
||||||
|
Loading…
Reference in New Issue
Block a user