From b96f8a20169f2fb399fc756df4a72e14d82cf7fa Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 18 Feb 2020 17:25:23 +0100 Subject: WTH nil is not propagated correctly ? got quantum nil if not doing this --- connector/mattermost/mattermost.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connector/mattermost/mattermost.go b/connector/mattermost/mattermost.go index ca49c99..41f956b 100644 --- a/connector/mattermost/mattermost.go +++ b/connector/mattermost/mattermost.go @@ -247,7 +247,10 @@ func (mm *Mattermost) Send(event *Event) error { } _, resp := mm.conn.Client.CreatePost(post) - return resp.Error + if resp.Error != nil { + return resp.Error + } + return nil } func (mm *Mattermost) Close() { -- cgit v1.2.3