Skip to content

Stories #170

Merged
SpEcHiDe merged 54 commits intodevfrom
stories-9.0
May 9, 2025
Merged

Stories #170
SpEcHiDe merged 54 commits intodevfrom
stories-9.0

Conversation

@SpEcHiDe
Copy link
Contributor

@SpEcHiDe SpEcHiDe commented Apr 17, 2025

@SpEcHiDe SpEcHiDe requested a review from Copilot April 28, 2025 17:16
@SpEcHiDe SpEcHiDe marked this pull request as ready for review April 28, 2025 17:16

This comment was marked as outdated.

@SpEcHiDe SpEcHiDe requested a review from Copilot April 28, 2025 17:20

This comment was marked as outdated.

@SpEcHiDe SpEcHiDe requested a review from Copilot April 29, 2025 04:32

This comment was marked as outdated.

This comment was marked as off-topic.

@SpEcHiDe SpEcHiDe marked this pull request as draft May 7, 2025 14:23
@SpEcHiDe SpEcHiDe marked this pull request as ready for review May 8, 2025 17:07
@SpEcHiDe SpEcHiDe requested a review from Copilot May 8, 2025 17:07

This comment was marked as outdated.

@SpEcHiDe SpEcHiDe requested a review from Copilot May 8, 2025 17:33

This comment was marked as outdated.

@SpEcHiDe SpEcHiDe requested a review from Copilot May 9, 2025 03:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces new Story-related classes and methods, such as posting, editing, deleting, and managing stories, and also improves the story link parsing in get_messages. Additionally, the PR updates multiple messaging methods to use a safer and more consistent pattern when retrieving business connection objects.

  • Updated business connection retrieval in several messaging methods by replacing direct indexing with a .get() method and explicit None checks.
  • Added support for parsing story links in get_messages.
  • Updated documentation to include the new Story API.

Reviewed Changes

Copilot reviewed 70 out of 70 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
pyrogram/methods/messages/send_video.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_sticker.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_photo.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_paid_media.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_message.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_media_group.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_document.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_audio.py Updates business connection retrieval logic.
pyrogram/methods/messages/send_animation.py Updates business connection retrieval logic.
pyrogram/methods/messages/edit_message_text.py Updates business connection retrieval logic.
pyrogram/methods/messages/edit_message_reply_markup.py Updates business connection retrieval logic.
pyrogram/methods/messages/edit_message_media.py Updates business connection retrieval logic.
pyrogram/methods/messages/edit_cached_media.py Updates business connection retrieval logic.
pyrogram/methods/chats/unpin_chat_message.py Updates business connection retrieval logic.
pyrogram/methods/chats/pin_chat_message.py Updates business connection retrieval logic and slight indentation fix.
pyrogram/methods/business/get_owned_star_count.py Updates business connection retrieval logic.
pyrogram/methods/messages/get_messages.py Adds new branch to handle story links and standardizes error messages for bots in story links.
Comments suppressed due to low confidence (1)

pyrogram/methods/messages/get_messages.py:152

  • [nitpick] The error message for story link parsing is clear, though consider reviewing consistency with other link parsing error messages. Ensure that this message is documented appropriately in the API reference.
raise ValueError("Invalid ClientType used to parse this story link")

@SpEcHiDe SpEcHiDe merged commit 6c35611 into dev May 9, 2025
@SpEcHiDe SpEcHiDe deleted the stories-9.0 branch May 9, 2025 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants