balena-io-experimental / meetbot

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

patch: Add google meet URL validator #42

Closed vipulgupta2048 closed 2 years ago

vipulgupta2048 commented 2 years ago

How it looks like,

➜  ~ curl localhost:8080/join -H "Content-Type: application/json" -d '{"url":"https://google.com/fsdfsdogx-obof-gox"}'
Unable to join. Invalid Google Meet URL in payload body. 
➜  ~ curl localhost:8080/leave -H "Content-Type: application/json" -d '{"url":"fsdfsdogx-obof-gox"}'
Invalid URL provided: fsdfsdogx-obof-gox
➜  ~ curl localhost:8080/join -H "Content-Type: application/json" -d '{"url":212}'
Unable to join. Invalid URL provided: 212
➜  ~ curl localhost:8080/join -H "Content-Type: application/json" -d '{"name":"bond.James."}'  
Unable to join. Missing `url` value in payload body.⏎   

Signed-off-by: Vipul Gupta (@vipulgupta2048) vipul@balena.io

vipulgupta2048 commented 2 years ago

This PR was brought to you by GitHub copilot. Context: https://www.flowdock.com/app/rulemotion/r-summit/messages/113795