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

Add support for showing/hiding join/leave messages from mattermost. Closes #147

This commit is contained in:
Wim
2017-04-07 22:27:36 +02:00
parent 33dffd5ea8
commit bd38319d83
3 changed files with 30 additions and 10 deletions

View File

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