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

Update code to mattermost 3.3.0 API changes

This commit is contained in:
Wim
2016-08-15 18:49:17 +02:00
parent 24defcb970
commit 6c6000dbbd
2 changed files with 76 additions and 38 deletions

View File

@ -154,8 +154,9 @@ func (b *Bmattermost) handleMatter() {
func (b *Bmattermost) handleMatterClient(mchan chan *MMMessage) {
for message := range b.mc.MessageChan {
// do not post our own messages back to irc
if message.Raw.Action == "posted" && b.mc.User.Username != message.Username {
if message.Raw.Event == "posted" && b.mc.User.Username != message.Username {
flog.mm.Debugf("receiving from matterclient %#v", message)
flog.mm.Debugf("receiving from matterclient %#v", message.Raw)
m := &MMMessage{}
m.Username = message.Username
m.Channel = message.Channel