diff options
author | Wim <wim@42.be> | 2017-04-07 22:27:36 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-04-07 22:27:36 +0200 |
commit | bd38319d8352e48eb0e29c5e30f094e5430d63e8 (patch) | |
tree | a35b3d1bad7019476169ca4e39a44162e5393e00 /matterclient | |
parent | 33dffd5ea84890c85771a8ab759750192501f041 (diff) | |
download | matterbridge-msglm-bd38319d8352e48eb0e29c5e30f094e5430d63e8.tar.gz matterbridge-msglm-bd38319d8352e48eb0e29c5e30f094e5430d63e8.tar.bz2 matterbridge-msglm-bd38319d8352e48eb0e29c5e30f094e5430d63e8.zip |
Add support for showing/hiding join/leave messages from mattermost. Closes #147
Diffstat (limited to 'matterclient')
-rw-r--r-- | matterclient/matterclient.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index beae8070..d2bfbae7 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -34,6 +34,7 @@ type Message struct { Channel string Username string Text string + Type string } type Team struct { @@ -266,6 +267,7 @@ func (m *MMClient) parseActionPost(rmsg *Message) { } rmsg.Username = m.GetUser(data.UserId).Username rmsg.Channel = m.GetChannelName(data.ChannelId) + rmsg.Type = data.Type rmsg.Team = m.GetTeamName(rmsg.Raw.Data["team_id"].(string)) // direct message if rmsg.Raw.Data["channel_type"] == "D" { |