balena-io-experimental / meetbot

A Google Meet bot to make meetings frictionless
GNU Affero General Public License v3.0
32 stars 13 forks source link

Cleanup events #69

Closed 20k-ultra closed 2 years ago

20k-ultra commented 2 years ago

989b9d16c3b65b36c440f3db8b2786c63c7169ea - Making the end event an error makes it more clear that this event was not suppose to happen. I also removed the double end event being emitted since the finally will always run after the catch.

Here's an example of the error being catch and logged + bot being removed from active bot list.

Initializing meetbot service...
Listening for requests on port 8080
Current bot queue size: 1
typing out email
Unrecoverable bot error occured:  waiting for selector `input[type="emailbruhhh"]` failed: timeout 30000ms exceeded
Removing https://meet.google.com/eaa-ewrq-gdn from active bot queue

8f01e85bdcb6a620172a699639fd523b3e6896d7 - The events were passing url data when the bot itself had a url property. I also made the left event trigger the manager to remove the bot.

7d44e65ce2b345caa677bd3b055b82847bfbc4a5 - the bot previously never knew when it was kicked. This uses an XPATH that searches for a div with text. It seems much more robust the our other selectors...worth switching them all to this since we no longer depend on classes which all appear dynamically generated by Google.

c54532ff088f78cf3e1692690368d89ca8cf1537 - sets a leftAt timestamp so we can track when a bot has left a meet.