neopostmodern / wohnungsbot

Der Wohnungsbot — die Anwendung zum 2. Akt ("Das Versprechen des Bots") des Automatisierungsdramas in drei Akten "Von einem der auszog eine Wohnung in Berlin zu finden" von Clemens Schöll
https://wohnungsbot.de
GNU Affero General Public License v3.0
151 stars 27 forks source link

Play audio notification when user input is required (captcha) #77

Open neopostmodern opened 2 years ago

neopostmodern commented 2 years ago

As the bot presumably runs in the background and possibly while the user does something else it would be good to have an option to play an audio notification when user input is required, such as for solving a captcha. Additionally it would maybe be good to bring the window into focus when user input is required.

Reported via mail

vin-ni commented 2 years ago

Is there a central function called when user input is required? What userinputs are there? Captcha, what else?

neopostmodern commented 2 years ago

@vin-ni AFAIC it's only captchas for now. As outlined in https://github.com/neopostmodern/wohnungsbot/issues/59#issuecomment-799841968 the central function is setInteractiveMode. I'd suggest to use the bot middleware to listen for SET_INTERACTIVE_MODE and then play sound from there.