summaryrefslogtreecommitdiffstats
path: root/matterclient
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-06-18 15:44:54 +0200
committerWim <wim@42.be>2017-06-18 15:44:54 +0200
commit2ddc4f7ae91a51bc8fa279fdab3c7d64600e1a25 (patch)
tree060c4b14360809d4981cbf3b3b6701e84c48af54 /matterclient
parent2dd402675d774eec8a3d4b062afb6a5eaf6f884c (diff)
downloadmatterbridge-msglm-2ddc4f7ae91a51bc8fa279fdab3c7d64600e1a25.tar.gz
matterbridge-msglm-2ddc4f7ae91a51bc8fa279fdab3c7d64600e1a25.tar.bz2
matterbridge-msglm-2ddc4f7ae91a51bc8fa279fdab3c7d64600e1a25.zip
Add UserID to each message. Closes #200
Diffstat (limited to 'matterclient')
-rw-r--r--matterclient/matterclient.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go
index 927518e9..de2aa947 100644
--- a/matterclient/matterclient.go
+++ b/matterclient/matterclient.go
@@ -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