From 8b1e03d8e9b7182d0988cd8224fa62b13c2456c5 Mon Sep 17 00:00:00 2001 From: Schimon Jehudah Date: Tue, 2 Jan 2024 12:17:48 +0000 Subject: [PATCH] Restrict command breakpoint --- slixfeed/xmpp/process.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/slixfeed/xmpp/process.py b/slixfeed/xmpp/process.py index 2d41a68..e0c2b2d 100644 --- a/slixfeed/xmpp/process.py +++ b/slixfeed/xmpp/process.py @@ -147,7 +147,14 @@ async def message(self, message): match message_lowercase: case "breakpoint": - breakpoint() + if jid == get_value("accounts", "XMPP", "operator"): + breakpoint() + else: + response = ( + "This action is restricted. " + "Type: breakpoint." + ) + send_reply_message(self, message, response) case "commands": response = text.print_cmd() send_reply_message(self, message, response)