patch 2ab08fbae8ec48e123e86a498c287e7afcd173e1 Author: E. Bosch Date: Sat Jul 22 20:32:19 CEST 2023 * telegram: Add compact ID to all replies diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py --- old-irgramd/telegram.py 2024-11-22 16:39:48.622998584 +0100 +++ new-irgramd/telegram.py 2024-11-22 16:39:48.622998584 +0100 @@ -644,11 +644,14 @@ await self.irc.join_irc_channel(self.irc.irc_nick, channel, full_join=True) async def handle_telegram_reply(self, message): + space = ' ' trunc = '' replied = await message.get_reply_message() replied_msg = replied.message + cid = self.mid.num_to_id_offset(replied.peer_id, replied.id) if not replied_msg: - replied_msg = '[{}]'.format(self.mid.num_to_id_offset(replied.peer_id, replied.id)) + replied_msg = '' + space = '' elif len(replied_msg) > self.quote_len: replied_msg = replied_msg[:self.quote_len] trunc = '...' @@ -659,7 +662,7 @@ else: replied_nick = replied_user.irc_nick - return '|Re {}: {}{}| '.format(replied_nick, replied_msg, trunc) + return '|Re {}: [{}]{}{}{}| '.format(replied_nick, cid, space, replied_msg, trunc) async def handle_telegram_forward(self, message): space = space2 = ' '