-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added check slack channel in config, when get message #39
Conversation
Hey @gimmetm, Looks like
Running |
@gimmetm, the communication.slack.channel in the configuration is only for restricting push notifications from BotKube. So as per the design, we should be able to execute |
BTW we are disabling |
in case of multi cluster and each channel for each cluster, excute command
message shows other channel(cluster) info too. I don’t want show other
cluster command result on the channel.
thank you.
2019년 2월 20일 (수) 19:48, Prasad Ghangal <[email protected]>님이 작성:
… BTW we are disabling notifier commands execution outside the channel as a
part of separate issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJZhb77Wvp11xYGqBPtU1XCo78OF6-Q2ks5vPSgQgaJpZM4bEdaT>
.
|
pkg/slack/slack.go
Outdated
if err == nil { | ||
// Message posted in a group | ||
// Serve only if starts with mention | ||
if !strings.HasPrefix(ev.Text, "<@"+botID+"> ") { | ||
continue | ||
} | ||
// if checkChannel is true | ||
// Serve only if current group is in config | ||
if b.CheckChannel && (b.ChannelName != group.Name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gimmetm can you please remove this check? We should be able to execute BotKube commands from group chats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PrasadG193 This check is for private channel. (https://api.slack.com/methods/groups.info)
group chat info might be in conversation.info or else.
Also, please squash your commits into one |
…annel pair use) Replace slack api(channel.info, gruop.info) -> conversation.info
@gimmetm actually, client.GroupInfo() (https://godoc.org/github.com/nlopes/slack#Client.GetGroupInfo) returns true for a private channel as well as group chat. We need to find a better way to differentiate between them. |
@PrasadG193 I replaced GetChannelInfo&GetGroupInfo -> GetConversationInfo, |
Nice! But still, group BotKube is not responding in group chat. Can you please test it on your setup? |
Let's track this as a separate issue |
For cluster-channel pair use