Open LeonYasoon opened 6 months ago
Hello @LeonYasoon - Thanks for raising your query. Could you please share the complete code if possible so that we can quickly investigate your issue?
Hi @ChetanSharma-msft The necessary code to reproduce is related to the botbuilder SDK:
botClient.conversations.sendToConversation(channelId, activity)
Run this command in these scenarios:
Hi @LeonYasoon - We are bit confused here. Let us know if our understanding correct or not 1.First your channel moderation is off, and bot was able to post messages in channel. (Expected)
2.Then you turned on channel moderation and "Allow bots to post into this channel" box is NOT checked => Bot not able to post expected)
3.Then again you turned off channel moderation and bot is able to post messages in channel. (Here you want to know if it expected behaviour or not)
Hi @Vikram-MSFT - @LeonYasoon is currently oof, but let me explain. 1 & 2 are correct, but what we are seeing is 3: once you turn off channel moderation (and the bot checkbox is still unchecked) - it will still be blocked! Even though moderation is turned off.
See my video with details:
So it seems the backend only evaluates the "Allow bots to submit channel messages" checkbox, but not the "moderation" = off, which seems wrong.
Hello @LeonYasoon We are also able to repro this issue, we will check internally and get back to you. Update : We raised a bug for this issue, we will keep you posted on the updates. Thank you
The channel moderation settings allow users in the Teams UI to disallow bots from posting into the channel:
When unticking that box and the turning the whole channel moderation feature off
bots still cannot post into that channel. The error message thrown by the botbuilder framework is "User blocked conversation with the bot."
Turning the moderation back on, ticking the box, then turning it off makes it work again.
-> It seems like the "Allow bots to post into this channel" box is evaluated regardless of the channel moderation feature being on or off for that channel.
Steps to reproduce the behavior:
Expected behavior The expected behaviour would be that channel moderation settings are only evaluated when channel moderation is on.