diff options
author | Duco van Amstel <duco.vanamstel@gmail.com> | 2019-03-15 20:23:09 +0000 |
---|---|---|
committer | Wim <wim@42.be> | 2019-03-15 21:23:09 +0100 |
commit | fb2667631da8c0a2849fbfa595a99090b0acc9ed (patch) | |
tree | e4d6bc41502ed43d4ecd0cd1ab904be1c686996f /bridge/slack/helpers.go | |
parent | b638f7037a270a7b84b6e7433ffda761dfd7a44b (diff) | |
download | matterbridge-msglm-fb2667631da8c0a2849fbfa595a99090b0acc9ed.tar.gz matterbridge-msglm-fb2667631da8c0a2849fbfa595a99090b0acc9ed.tar.bz2 matterbridge-msglm-fb2667631da8c0a2849fbfa595a99090b0acc9ed.zip |
Refactor channel and user management (slack) (#766)
Diffstat (limited to 'bridge/slack/helpers.go')
-rw-r--r-- | bridge/slack/helpers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bridge/slack/helpers.go b/bridge/slack/helpers.go index ddbc770f..7c012a4b 100644 --- a/bridge/slack/helpers.go +++ b/bridge/slack/helpers.go @@ -15,7 +15,7 @@ import ( // router before we apply message-dependent modifications. func (b *Bslack) populateReceivedMessage(ev *slack.MessageEvent) (*config.Message, error) { // Use our own func because rtm.GetChannelInfo doesn't work for private channels. - channel, err := b.getChannelByID(ev.Channel) + channel, err := b.channels.getChannelByID(ev.Channel) if err != nil { return nil, err } @@ -77,7 +77,7 @@ func (b *Bslack) populateMessageWithUserInfo(ev *slack.MessageEvent, rmsg *confi return nil } - user := b.getUser(userID) + user := b.users.getUser(userID) if user == nil { return fmt.Errorf("could not find information for user with id %s", ev.User) } @@ -148,7 +148,7 @@ func (b *Bslack) extractTopicOrPurpose(text string) (string, string) { func (b *Bslack) replaceMention(text string) string { replaceFunc := func(match string) string { userID := strings.Trim(match, "@<>") - if username := b.getUsername(userID); userID != "" { + if username := b.users.getUsername(userID); userID != "" { return "@" + username } return match |