From 22b57447260ab1fa7029bfc5a9244f81d5944a60 Mon Sep 17 00:00:00 2001 From: Shubham Padia Date: Tue, 24 Jun 2025 07:29:20 +0000 Subject: [PATCH] help: Remove unused message_handle_match. A search for `relative|message` returns zero matches. We should remove this unused part of `help_relative_links`. --- zerver/lib/markdown/help_relative_links.py | 47 ---------------------- 1 file changed, 47 deletions(-) diff --git a/zerver/lib/markdown/help_relative_links.py b/zerver/lib/markdown/help_relative_links.py index 24bc38caf7..488bbde706 100644 --- a/zerver/lib/markdown/help_relative_links.py +++ b/zerver/lib/markdown/help_relative_links.py @@ -160,57 +160,10 @@ def group_handle_match(key: str) -> str: return group_all_instructions.format(item=item) -draft_instructions = """ -1. Click on **Drafts** in the left sidebar. -""" - -scheduled_instructions = """ -1. Click on **Scheduled messages** in the left - sidebar. If you do not see this link, you have no scheduled messages. -""" - -recent_instructions = """ -1. Click on **Recent conversations** in the left - sidebar, or use the T keyboard shortcut.. -""" - -all_instructions = """ -1. Click on **Combined feed** in the left - sidebar, or use the A keyboard shortcut. -""" - -starred_instructions = """ -1. Click on **Starred messages** in the left - sidebar, or by [searching](/help/search-for-messages) for `is:starred`. -""" - -inbox_instructions = """ -1. Click on **Inbox** in the left - sidebar, or use the Shift + I keyboard shortcut. -""" - -message_info = { - "drafts": ["Drafts", "/#drafts", draft_instructions], - "scheduled": ["Scheduled messages", "/#scheduled", scheduled_instructions], - "recent": ["Recent conversations", "/#recent", recent_instructions], - "all": ["Combined feed", "/#feed", all_instructions], - "starred": ["Starred messages", "/#narrow/is/starred", starred_instructions], - "inbox": ["Inbox", "/#inbox", inbox_instructions], -} - - -def message_handle_match(key: str) -> str: - if relative_help_links: - return f"1. Go to [{message_info[key][0]}]({message_info[key][1]})." - else: - return message_info[key][2] - - LINK_TYPE_HANDLERS = { "gear": gear_handle_match, "gear-billing": billing_handle_match, "channel": channel_handle_match, - "message": message_handle_match, "help": help_handle_match, "group": group_handle_match, }