summaryrefslogtreecommitdiffstats
path: root/bridge/slack/helpers.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-11-08 22:01:29 +0100
committerWim <wim@42.be>2018-11-08 22:01:29 +0100
commit1e0bb3da954831d41ae958da22bf7294dbbe0822 (patch)
tree14519fd1bbab1f7111bd33a43c1148d19b0f8ee4 /bridge/slack/helpers.go
parent59994da176f1bde83fb56e8c76f91edc3e549615 (diff)
downloadmatterbridge-msglm-1e0bb3da954831d41ae958da22bf7294dbbe0822.tar.gz
matterbridge-msglm-1e0bb3da954831d41ae958da22bf7294dbbe0822.tar.bz2
matterbridge-msglm-1e0bb3da954831d41ae958da22bf7294dbbe0822.zip
Make gocritic linter happier
Diffstat (limited to 'bridge/slack/helpers.go')
-rw-r--r--bridge/slack/helpers.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/bridge/slack/helpers.go b/bridge/slack/helpers.go
index 19ac5d09..fdcef2e7 100644
--- a/bridge/slack/helpers.go
+++ b/bridge/slack/helpers.go
@@ -205,11 +205,12 @@ func (b *Bslack) populateMessageWithUserInfo(ev *slack.MessageEvent, rmsg *confi
// Second, deal with "real" users if we have the necessary information.
var userID string
- if ev.User != "" {
+ switch {
+ case ev.User != "":
userID = ev.User
- } else if ev.SubMessage != nil && ev.SubMessage.User != "" {
+ case ev.SubMessage != nil && ev.SubMessage.User != "":
userID = ev.SubMessage.User
- } else {
+ default:
return nil
}