forked from lug/matterbridge
		
	Replace HTML entities (slack). #215
This commit is contained in:
		| @@ -6,6 +6,7 @@ import ( | |||||||
| 	"github.com/42wim/matterbridge/matterhook" | 	"github.com/42wim/matterbridge/matterhook" | ||||||
| 	log "github.com/Sirupsen/logrus" | 	log "github.com/Sirupsen/logrus" | ||||||
| 	"github.com/nlopes/slack" | 	"github.com/nlopes/slack" | ||||||
|  | 	"html" | ||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strings" | 	"strings" | ||||||
| 	"time" | 	"time" | ||||||
| @@ -192,6 +193,7 @@ func (b *Bslack) handleSlack() { | |||||||
| 		texts := strings.Split(message.Text, "\n") | 		texts := strings.Split(message.Text, "\n") | ||||||
| 		for _, text := range texts { | 		for _, text := range texts { | ||||||
| 			text = b.replaceURL(text) | 			text = b.replaceURL(text) | ||||||
|  | 			text = html.UnescapeString(text) | ||||||
| 			flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.Account) | 			flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.Account) | ||||||
| 			b.Remote <- config.Message{Text: text, Username: message.Username, Channel: message.Channel, Account: b.Account, Avatar: b.getAvatar(message.Username), UserID: message.UserID} | 			b.Remote <- config.Message{Text: text, Username: message.Username, Channel: message.Channel, Account: b.Account, Avatar: b.getAvatar(message.Username), UserID: message.UserID} | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Wim
					Wim