From 84958ef7f3532859b9e861e7b7683d9a60fbcea6 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 11 Apr 2021 13:49:51 -0700 Subject: [PATCH] Oops, webhook not websocket --- cli/onionshare_cli/web/receive_mode.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/onionshare_cli/web/receive_mode.py b/cli/onionshare_cli/web/receive_mode.py index d3bd3c2b..26ec0b65 100644 --- a/cli/onionshare_cli/web/receive_mode.py +++ b/cli/onionshare_cli/web/receive_mode.py @@ -108,7 +108,7 @@ class ReceiveModeWeb: and not request.upload_error and len(files) > 0 ): - self.send_websocket_notification(f"{len(files)} files uploaded") + self.send_webhook_notification(f"{len(files)} files uploaded") if request.upload_error: self.common.log( @@ -181,8 +181,8 @@ class ReceiveModeWeb: return self.web.error403() return upload(ajax=True) - def send_websocket_notification(self, data): - self.common.log("ReceiveModeWeb", "send_websocket_notification", data) + def send_webhook_notification(self, data): + self.common.log("ReceiveModeWeb", "send_webhook_notification", data) try: requests.post( self.web.settings.get("receive", "webhook_url"), @@ -193,7 +193,7 @@ class ReceiveModeWeb: except Exception as e: self.common.log( "ReceiveModeWeb", - "send_websocket_notification", + "send_webhook_notification", f"sending failed: {e}", )