From bd38319d8352e48eb0e29c5e30f094e5430d63e8 Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 7 Apr 2017 22:27:36 +0200 Subject: Add support for showing/hiding join/leave messages from mattermost. Closes #147 --- matterclient/matterclient.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'matterclient') 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" { -- cgit v1.2.3