4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 16:39:24 +00:00

Clean up various stuff (#508)

* various cleanups
This commit is contained in:
David Hill
2018-11-07 14:36:50 -05:00
committed by Wim
parent 141a42a75b
commit 0e2522279e
11 changed files with 77 additions and 54 deletions

View File

@ -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