From 94c8068594f982f9ad50655d386f0c5b8d8fdc29 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Sun, 9 Feb 2025 07:16:56 +0300 Subject: [PATCH] Change PostParser method visibility: Make channel_name_prepare public --- post_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post_parser.py b/post_parser.py index d4ad9f8..c386cf3 100644 --- a/post_parser.py +++ b/post_parser.py @@ -68,7 +68,7 @@ class PostParser: print(debug_message) return - def _channel_name_prepare(self, channel: str): + def channel_name_prepare(self, channel: str): if isinstance(channel, str) and channel.startswith('-100'): # Convert numeric channel ID to int channel_id = int(channel) return channel_id @@ -78,7 +78,7 @@ class PostParser: async def get_post(self, channel: str, post_id: int, output_type: str = 'json') -> Union[str, Dict[Any, Any]]: print(f"Getting post {channel}, {post_id}") try: - channel = self._channel_name_prepare(channel) + channel = self.channel_name_prepare(channel) message = await self.client.get_messages(channel, post_id) self._debug_message(message)