Commit aaa4f28
committed
feat(messages): forward list of ids and expose grouped_id
`forward_message` now accepts `Union[int, List[int]]` for `message_id`.
When given a list, Telethon's `forward_messages` preserves Telegram album
grouping (messages sharing a `grouped_id`) in the destination chat, which
was impossible with the previous single-int signature.
`list_messages` and `get_message_context` now include `grouped_id` in
each record when present, so callers can detect album membership and
forward all parts atomically.
Motivated by an agent use case: forwarding multi-photo posts (3+ photos
with a caption) produced one detached photo at a time. Without
`grouped_id` exposure there was no way to discover sibling messages, and
without list-id forward there was no way to preserve the album.1 parent 479230d commit aaa4f28
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
| |||
639 | 642 | | |
640 | 643 | | |
641 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
642 | 648 | | |
643 | 649 | | |
644 | 650 | | |
| |||
683 | 689 | | |
684 | 690 | | |
685 | 691 | | |
686 | | - | |
| 692 | + | |
687 | 693 | | |
688 | 694 | | |
689 | 695 | | |
690 | 696 | | |
691 | | - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
692 | 702 | | |
693 | 703 | | |
694 | 704 | | |
695 | 705 | | |
696 | 706 | | |
697 | 707 | | |
698 | | - | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
699 | 712 | | |
700 | 713 | | |
701 | 714 | | |
| |||
0 commit comments