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

Add UserID to each message. Closes #200

This commit is contained in:
Wim
2017-06-18 15:44:54 +02:00
parent 2dd402675d
commit 2ddc4f7ae9
13 changed files with 20 additions and 12 deletions

View File

@ -37,6 +37,7 @@ type Message struct {
Username string
Text string
Type string
UserID string
}
type Team struct {
@ -290,6 +291,7 @@ func (m *MMClient) parseActionPost(rmsg *Message) {
}
rmsg.Username = m.GetUserName(data.UserId)
rmsg.Channel = m.GetChannelName(data.ChannelId)
rmsg.UserID = data.UserId
rmsg.Type = data.Type
teamid, _ := rmsg.Raw.Data["team_id"].(string)
// edit messsages have no team_id for some reason