From 2ddc4f7ae91a51bc8fa279fdab3c7d64600e1a25 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 18 Jun 2017 15:44:54 +0200 Subject: Add UserID to each message. Closes #200 --- matterclient/matterclient.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'matterclient') 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 -- cgit v1.2.3