patch 170328f9bde0160c50f56b98cbf51c8726ab4d69 Author: E. Bosch Date: Sun Apr 7 19:48:33 CEST 2024 * telegram: Fix a corner case in forward handler when saved_from_peer is not present diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py --- old-irgramd/telegram.py 2024-11-22 15:51:50.903644353 +0100 +++ new-irgramd/telegram.py 2024-11-22 15:51:50.903644353 +0100 @@ -2,7 +2,7 @@ # telegram.py: Interface to Telethon Telegram library # # Copyright (c) 2019 Peter Bui -# Copyright (c) 2020-2023 E. Bosch +# Copyright (c) 2020-2024 E. Bosch # # Use of this source code is governed by a MIT style license that # can be found in the LICENSE file included in this project. @@ -712,8 +712,8 @@ secondary_name = saved_peer_name else: # if it's from me I want to know who was the destination of a message (user) - if self.refwd_me: - secondary_name = self.get_irc_user_from_telegram(message.fwd_from.saved_from_peer.user_id).irc_nick + if self.refwd_me and (saved_from_peer := message.fwd_from.saved_from_peer) is not None: + secondary_name = self.get_irc_user_from_telegram(saved_from_peer.user_id).irc_nick else: secondary_name = '' space2 = ''