service: Add absolute ID as argument to get command
patch 9c73d6fcff003a7d9b4f5f90df4f6dc71d84ae9d
Author: E. Bosch <presidev@AT@gmail.com>
Date: Tue Nov 28 22:38:01 CET 2023
* service: Add absolute ID as argument to get command
hunk ./service.py 109
- id = self.tg.mid.id_to_num_offset(peer_id, mid)
+ # If the ID starts with '=' is absolute ID, not compact ID
+ # character '=' is not used by compact IDs
+ if mid[0] == '=':
+ id = int(mid[1:])
+ else:
+ id = self.tg.mid.id_to_num_offset(peer_id, mid)
hunk ./service.py 128
- ' get <peer> <compact_id>',
- 'Get one message from peer with the compact ID',
+ ' get <peer> <compact_id|=ID>',
+ 'Get one message from peer with the compact or absolute ID',