telegram: Change event/message if statement by an expression
patch 5588befb5af1bef24d1309002c728e1cd2799fe6
Author: E. Bosch <presidev@AT@gmail.com>
Date: Thu May 4 22:04:15 CEST 2023
* telegram: Change event/message if statement by an expression
diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py
--- old-irgramd/telegram.py 2024-11-22 15:17:01.718966570 +0100
+++ new-irgramd/telegram.py 2024-11-22 15:17:01.718966570 +0100
@@ -451,10 +451,7 @@
async def handle_telegram_message(self, event, message=None, upd_to_webpend=None):
self.logger.debug('Handling Telegram Message: %s', event or message)
- if event:
- msg = event.message
- else:
- msg = message
+ msg = event.message if event else message
user = self.get_irc_user_from_telegram(msg.sender_id)
mid = self.mid.num_to_id_offset(msg.id)