Add ability to forward messages as copies · pyrogram/pyrogram@d1fedf1 · GitHub
Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit d1fedf1

Browse files
committed
Add ability to forward messages as copies
1 parent a4ea3f7 commit d1fedf1

5 files changed

Lines changed: 275 additions & 36 deletions

File tree

pyrogram/client/methods/messages/forward_messages.py

Lines changed: 53 additions & 25 deletions

pyrogram/client/methods/messages/send_contact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def send_contact(self,
7979
media=types.InputMediaContact(
8080
phone_number=phone_number,
8181
first_name=first_name,
82-
last_name=last_name,
83-
vcard=vcard
82+
last_name=last_name or '',
83+
vcard=vcard or ''
8484
),
8585
message="",
8686
silent=disable_notification or None,

pyrogram/client/style/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, peers_by_id):
4040

4141
def parse(self, message: str):
4242
entities = []
43-
message = utils.add_surrogates(str(message))
43+
message = utils.add_surrogates(str(message or ''))
4444
offset = 0
4545

4646
for match in self.HTML_RE.finditer(message):

pyrogram/client/style/markdown.py

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)