summaryrefslogtreecommitdiffstats
path: root/bridge/xmpp
diff options
context:
space:
mode:
authorDavid Hill <dhill@mindcry.org>2018-11-07 14:36:50 -0500
committerWim <wim@42.be>2018-11-07 20:36:50 +0100
commit0e2522279e8671a345c1be6b8b07c0f1a505e23e (patch)
tree968ac4b1acd0352ae9962d6f71bfd7d9c668596f /bridge/xmpp
parent141a42a75b47b0a05f5b360ff5711819d3727a75 (diff)
downloadmatterbridge-msglm-0e2522279e8671a345c1be6b8b07c0f1a505e23e.tar.gz
matterbridge-msglm-0e2522279e8671a345c1be6b8b07c0f1a505e23e.tar.bz2
matterbridge-msglm-0e2522279e8671a345c1be6b8b07c0f1a505e23e.zip
Clean up various stuff (#508)
* various cleanups
Diffstat (limited to 'bridge/xmpp')
-rw-r--r--bridge/xmpp/xmpp.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go
index 4ace2abd..4d6cc3cf 100644
--- a/bridge/xmpp/xmpp.go
+++ b/bridge/xmpp/xmpp.go
@@ -75,8 +75,6 @@ func (b *Bxmpp) JoinChannel(channel config.ChannelInfo) error {
}
func (b *Bxmpp) Send(msg config.Message) (string, error) {
- var msgid = ""
- var msgreplaceid = ""
// ignore delete messages
if msg.Event == config.EVENT_MSG_DELETE {
return "", nil
@@ -93,7 +91,8 @@ func (b *Bxmpp) Send(msg config.Message) (string, error) {
}
}
- msgid = xid.New().String()
+ var msgreplaceid string
+ msgid := xid.New().String()
if msg.ID != "" {
msgid = msg.ID
msgreplaceid = msg.ID