From 4701602355e26affb6c193ae2aeb52a19483992c Mon Sep 17 00:00:00 2001 From: Schimon Jehudah Date: Tue, 2 Jan 2024 12:12:29 +0000 Subject: [PATCH] Restrict command bookmarks --- slixfeed/xmpp/process.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/slixfeed/xmpp/process.py b/slixfeed/xmpp/process.py index 27e5441..2d41a68 100644 --- a/slixfeed/xmpp/process.py +++ b/slixfeed/xmpp/process.py @@ -275,12 +275,18 @@ async def message(self, message): ).format(muc_jid) else: response = ( - "This response is restricted. " + "This action is restricted. " "Type: removing bookmarks." ) send_reply_message(self, message, response) case "bookmarks": - response = await compose.list_bookmarks(self) + if jid == get_value("accounts", "XMPP", "operator"): + response = await compose.list_bookmarks(self) + else: + response = ( + "This action is restricted. " + "Type: viewing bookmarks." + ) send_reply_message(self, message, response) case _ if message_lowercase.startswith("deny +"): key = "filter-" + message_text[:4]