diff options
author | Wim <wim@42.be> | 2016-08-16 00:08:38 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-08-20 18:08:57 +0200 |
commit | e11d786775cf64123227a44983067cc463e632f5 (patch) | |
tree | 1c26971dc864a6e0549f2b11964124ecd380261e /bridge/xmpp | |
parent | 889b6debc4f339975076668b6ab7d85f7dd08922 (diff) | |
download | matterbridge-msglm-e11d786775cf64123227a44983067cc463e632f5.tar.gz matterbridge-msglm-e11d786775cf64123227a44983067cc463e632f5.tar.bz2 matterbridge-msglm-e11d786775cf64123227a44983067cc463e632f5.zip |
Move nickformatting into bridge
Diffstat (limited to 'bridge/xmpp')
-rw-r--r-- | bridge/xmpp/xmpp.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index 5d10f9bd..5d602475 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -59,11 +59,7 @@ func (b *Bxmpp) Name() string { } func (b *Bxmpp) Send(msg config.Message) error { - username := msg.Username + ": " - if b.Config.Xmpp.RemoteNickFormat != "" { - username = strings.Replace(b.Config.Xmpp.RemoteNickFormat, "{NICK}", msg.Username, -1) - } - b.xc.Send(xmpp.Chat{Type: "groupchat", Remote: msg.Channel + "@" + b.Xmpp.Muc, Text: username + msg.Text}) + b.xc.Send(xmpp.Chat{Type: "groupchat", Remote: msg.Channel + "@" + b.Xmpp.Muc, Text: msg.Username + msg.Text}) return nil } @@ -126,7 +122,7 @@ func (b *Bxmpp) handleXmpp() error { nick = s[1] } if nick != b.Xmpp.Nick { - flog.xmpp.Info("sending message to remote", nick, v.Text, channel) + flog.xmpp.Infof("sending message to remote %s %s %s", nick, v.Text, channel) b.Remote <- config.Message{Username: nick, Text: v.Text, Channel: channel, Origin: "xmpp"} } } |