From d122bc8f9aa717e00ffe2923ba56ec07ab1ec49b Mon Sep 17 00:00:00 2001 From: Duco van Amstel Date: Mon, 26 Nov 2018 09:19:45 +0000 Subject: [PATCH] Attach extraction method to bridge struct --- bridge/slack/helpers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge/slack/helpers.go b/bridge/slack/helpers.go index 3e9e1880..39fbcea7 100644 --- a/bridge/slack/helpers.go +++ b/bridge/slack/helpers.go @@ -269,7 +269,7 @@ var ( topicOrPurposeRE = regexp.MustCompile(`(?s)(@.+) (cleared|set)(?: the)? channel (topic|purpose)(?:: (.*))?`) ) -func extractTopicOrPurpose(text string) (string, string) { +func (b *Bslack) extractTopicOrPurpose(text string) (string, string) { r := topicOrPurposeRE.FindStringSubmatch(text) if len(r) == 5 { action, updateType, extracted := r[2], r[3], r[4] @@ -281,7 +281,7 @@ func extractTopicOrPurpose(text string) (string, string) { } } b.Log.Warnf("Encountered channel topic or purpose change message with unexpected format: %s", text) - return unknown, "" + return "unknown", "" } // @see https://api.slack.com/docs/message-formatting#linking_to_channels_and_users