erickubenka / conviva

Conviva is a simple Whatsapp Bot based on UI automation with Selenium and Testerra to answer commands in a specific group chat.
MIT License
0 stars 0 forks source link

React on quoted messages #14

Closed erickubenka closed 4 months ago

erickubenka commented 4 months ago

Is your feature request related to a problem? Please describe. When usign the bot in our chat group, we consider that it would be nice to quote a message of a user and trigger a command on that specific message like !tldr for extra long messages to sum it up. Or even !spellcheck to identify the users problems or similiar things.

For this kind of doing with the given functionality of commands right now and how the message object is structured we can not achieve this. But in the past we alrerady did a check for quoted messages, and we now can consider to always populate this kind of message as well in our model.

erickubenka commented 4 months ago

To solve: How to handle these commands, because basically the list of messages will be filtered for keywords before passed to the BotCommand.run() implementation. With this filtered list, no detection for the command itself on which message it was triggered is possible.

So the whole filter mechanism has to be updated or should be moved to antoher point in code were it belongs.

erickubenka commented 4 months ago

We closed this way to early. Everything works fine, but the when the quoted message is to long, it will be cut off and for example the !tldr command then will only summarize the given piece of text instead of the full message.

If a quoted message is detected, we should to navigate to this method and hit the "read more" button to get everything extracted from the method before building the object.