From f0e29db19640ce0c23c817923bbd0931cd82ab39 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Thu, 5 Dec 2024 07:35:56 +0530 Subject: [PATCH] summarize-topic: Use channel id instead of name. This avoid us from partially capturing channel name if it includes `-`. --- zulip/integrations/litellm/summarize-topic | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zulip/integrations/litellm/summarize-topic b/zulip/integrations/litellm/summarize-topic index 901017b0b..dd79efec5 100755 --- a/zulip/integrations/litellm/summarize-topic +++ b/zulip/integrations/litellm/summarize-topic @@ -71,9 +71,8 @@ if __name__ == "__main__": base_url, narrow_hash = url.split("#") narrow_hash_terms = narrow_hash.split("/") - channel = narrow_hash_terms[2].split("-")[1] + channel = int(narrow_hash_terms[2].split("-")[0]) topic = narrow_hash_terms[4] - channel = urllib.parse.unquote(channel.replace(".", "%")) topic = urllib.parse.unquote(topic.replace(".", "%")) narrow = [