Skip to content

Commit 5e72850

Browse files
KurimuzonAkumayasirarism
authored andcommitted
pyrofork: Fix send_gift method
Signed-off-by: Yasir <git@yasir.id>
1 parent ad0aed4 commit 5e72850

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pyrogram/methods/payments/send_gift.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,10 @@ async def send_gift(
7777
"""
7878
peer = await self.resolve_peer(chat_id)
7979

80-
if not isinstance(peer, (raw.types.InputPeerUser, raw.types.InputPeerSelf)):
81-
raise ValueError("chat_id must belong to a user.")
82-
8380
text, entities = (await utils.parse_text_entities(self, text, parse_mode, entities)).values()
8481

8582
invoice = raw.types.InputInvoiceStarGift(
86-
user_id=peer,
83+
peer=peer,
8784
gift_id=gift_id,
8885
hide_name=hide_my_name,
8986
include_upgrade=pay_for_upgrade,

0 commit comments

Comments
 (0)