Update call with attached method
This commit is contained in:
@@ -324,7 +324,7 @@ func (b *Bslack) sendRTM(msg config.Message) (string, error) {
|
|||||||
func (b *Bslack) updateTopicOrPurpose(msg *config.Message, channelInfo *slack.Channel) (bool, error) {
|
func (b *Bslack) updateTopicOrPurpose(msg *config.Message, channelInfo *slack.Channel) (bool, error) {
|
||||||
var updateFunc func(channelID string, value string) (*slack.Channel, error)
|
var updateFunc func(channelID string, value string) (*slack.Channel, error)
|
||||||
|
|
||||||
incomingChangeType, text := extractTopicOrPurpose(msg.Text)
|
incomingChangeType, text := b.extractTopicOrPurpose(msg.Text)
|
||||||
switch incomingChangeType {
|
switch incomingChangeType {
|
||||||
case "topic":
|
case "topic":
|
||||||
updateFunc = b.rtm.SetTopicOfConversation
|
updateFunc = b.rtm.SetTopicOfConversation
|
||||||
|
|||||||
Reference in New Issue
Block a user