From 4e993eae5935a8618902f75de4c24b089d2af96e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 2 Oct 2019 22:12:35 -0600 Subject: [PATCH] When not using a UI, assume it is safe to send to unverified devices This is also for bot/docker usage. It's arguable that this should be behind a config flag somewhere. --- pantalaimon/daemon.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index 4c8551f..22ac776 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -853,9 +853,12 @@ class ProxyDaemon: await self.send_ui_message(message) try: - response = await asyncio.wait_for( - queue.get(), self.unverified_send_timeout - ) + if self.send_queue: + response = await asyncio.wait_for( + queue.get(), self.unverified_send_timeout + ) + else: + response = SendAnywaysMessage("irrelevant_message_ID", client, room_id) if isinstance(response, CancelSendingMessage): # The send was canceled notify the client that sent the