Skip to content
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

Channel moderation settings are evaluated incorrectly when posting as a bot. #4665

Open
LeonYasoon opened this issue May 13, 2024 · 6 comments
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@LeonYasoon
Copy link

LeonYasoon commented May 13, 2024

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Versions

What package version of the SDK are you using: 4.20.0
What nodejs version are you using: 18
What browser version are you using: -
What os are you using: MacOS and Linux (prod)

Describe the bug

The channel moderation settings allow users in the Teams UI to disallow bots from posting into the channel:

Screenshot 2024-05-13 at 13 53 46

When unticking that box and the turning the whole channel moderation feature off

Screenshot 2024-05-13 at 13 53 54

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.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Teams -> Channel settings -> Turn on channel moderation
  2. Make sure the "Allow bots to post into this channel" box is NOT checked.
  3. Turn off channel moderation
  4. Try to post into that channel with the botbuilder sdk client.conversations.sendToConversation()
  5. Receive the "User blocked conversation with the bot." error.
  6. Turn on channel moderation and tick that box, turn channel moderation back off
  7. Post again -> no error.

Expected behavior

The expected behaviour would be that channel moderation settings are only evaluated when channel moderation is on.

@LeonYasoon LeonYasoon added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels May 13, 2024
@tracyboehrer
Copy link
Member

@LeonYasoon The moderation features are part of Teams. BF SDK itself doesn't have any knowledge about these things. At best, this would be a feature, but likely not something BF SDK could add on its own.

@LeonYasoon
Copy link
Author

@tracyboehrer So the "User blocked conversation" error is thrown by the API and the SDK just passes it along? Do you know where the best place to raise this bug would be then?

@tracyboehrer
Copy link
Member

@LeonYasoon Correct. Anything via Connector is always to the backend. Azure Bot Service or Teams. It's simply a request and gets a response. SDK doesn't even really know it's dealing with Teams, unless it's via a TeamsConnector, but it's the same model.

Do you happen to know the response code from that call? Though anything that isn't 200-202 is going to translate into an ErrorResponse.

I would say start with the folks in the Teams AI SDK repo. But I can't say they will deal with that directly or not.

@LeonYasoon
Copy link
Author

@tracyboehrer It's an http 403 with "ConversationBlockedByUser". I will raise this issue in another repo aswell.

@tracyboehrer
Copy link
Member

@LeonYasoon 403 is pretty generic. Most the bot could do is handle it more gracefully. Honestly, I didn't even realize Teams had this functionality.

@LeonYasoon
Copy link
Author

@tracyboehrer Well, at least it's a catchable error that one can handle, but the functionality needs to work properly according to what the users configure visually in the Teams UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

2 participants