Skip to content

Commit

Permalink
Fix StarGift caption parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Oct 24, 2024
1 parent b31be17 commit 50f8cd7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyrogram/types/messages_and_media/star_gift.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async def _parse_user_star_gift(
doc = user_star_gift.gift.sticker
attributes = {type(i): i for i in doc.attributes}

message, entities = (
caption, caption_entities = (
utils.parse_text_with_entities(
client, getattr(user_star_gift, "message", None), users
)
Expand All @@ -158,8 +158,8 @@ async def _parse_user_star_gift(
is_saved=not user_star_gift.unsaved if getattr(user_star_gift, "unsaved", None) else None,
from_user=types.User._parse(client, users.get(user_star_gift.from_id)) if getattr(user_star_gift, "from_id", None) else None,
message_id=getattr(user_star_gift, "msg_id", None),
caption=message,
caption_entities=entities,
caption=caption,
caption_entities=caption_entities,
client=client
)

Expand All @@ -174,7 +174,7 @@ async def _parse_action(
doc = action.gift.sticker
attributes = {type(i): i for i in doc.attributes}

message, entities = (
caption, caption_entities = (
utils.parse_text_with_entities(
client, getattr(action, "message", None), users
)
Expand All @@ -193,8 +193,8 @@ async def _parse_action(
is_saved=getattr(action, "saved", None),
from_user=types.User._parse(client, users.get(utils.get_raw_peer_id(message.peer_id))),
message_id=message.id,
caption=message,
caption_entities=entities,
caption=caption,
caption_entities=caption_entities,
client=client
)

Expand Down

0 comments on commit 50f8cd7

Please sign in to comment.