4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 23:29:25 +00:00

Move nickformatting into bridge

This commit is contained in:
Wim
2016-08-16 00:08:38 +02:00
parent 889b6debc4
commit e11d786775
4 changed files with 31 additions and 25 deletions

View File

@ -95,11 +95,7 @@ func (b *Bmattermost) Name() string {
func (b *Bmattermost) Send(msg config.Message) error {
flog.mm.Infof("mattermost send %#v", msg)
if msg.Origin != "mattermost" {
username := msg.Username + ": "
if b.Config.Mattermost.RemoteNickFormat != "" {
username = strings.Replace(b.Config.Mattermost.RemoteNickFormat, "{NICK}", msg.Username, -1)
}
return b.SendType(username, msg.Text, msg.Channel, "")
return b.SendType(msg.Username, msg.Text, msg.Channel, "")
}
return nil
}