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

Broadcast module - Filters not working #1739

Open
Naroh091 opened this issue Jun 3, 2023 · 0 comments
Open

Broadcast module - Filters not working #1739

Naroh091 opened this issue Jun 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Naroh091
Copy link

Naroh091 commented Jun 3, 2023

Describe the bug
Messages are never sent to users matching the filters.

To Reproduce
Steps to reproduce the behavior:

  1. Enable the broadcast module.
  2. Open a conversation using the emulator.
  3. Go to the broadcast module, create a new one, and add channel == 'web' as a filter. Remember to click the 'Add' button to actually add the filter.

image

Expected behavior
The message is sent to the matching users, which are those with channel == web, so at least the emulator conversation should receive it.

Instead, no message is sent.

Environment (please complete the following information):

  • Botpress Version: 12.30.8

Additional context
The main problem is that in daemon.ts, line 38, Botpress returns this typeof v !== 'undefined' && v !== null instead of the value of v, the variable in which the result of the matching is stored. If everything works fine v won't be undefined nor null, thus returning "true", which is the final value of drop of the dropPromise, dropping that message.

From what I've read I know that the Broadcast module was never ready, but I think it would be nice to have at least this fixed - I'll send a pull request in a couple of minutes.

@Naroh091 Naroh091 added the bug Something isn't working label Jun 3, 2023
@michaelmass michaelmass transferred this issue from botpress/botpress Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant