diff --git a/app/doorboy-proxy.py b/app/doorboy-proxy.py index f848fdb..1182a93 100755 --- a/app/doorboy-proxy.py +++ b/app/doorboy-proxy.py @@ -76,7 +76,7 @@ async def view_longpoll(request): async with app.ctx.db.eventlog.watch(pipeline) as stream: await response.send("data: watch-stream-opened\n\n") async for event in stream: - if event["fullDocument"].get("type") == "open-door": + if event["fullDocument"].get("type") == "open-door" and event["fullDocument"].get("approved", False): await response.send("data: %s\n\n" % event["fullDocument"]["door"]) except pymongo.errors.PyMongoError as e: