Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New classes for API 6.3:ForumTopic,ForumTopicCreated,ForumTopicClosed,ForumTopicReopened#3356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 33 commits intoapi_6.3_updatefromnew_classes_for_api_6.3
Nov 18, 2022

Conversation

lemontree210
Copy link
Member

@lemontree210lemontree210 commentedNov 11, 2022
edited by Bibo-Joshi
Loading

addresses#3340

  • create new classesForumTopic,ForumTopicCreated, empty classes
    ForumTopicClosed,ForumTopicReopened
  • add arguments and attributes toMessage:forum_topic_created,forum_topic_closed,forum_topic_reopened
  • update docs
  • add tests
    • to_dict,__eq__ etc. for each class
    • createForumTopic
    • editForumTopic
    • closeForumTopic
    • reopenForumTopic
    • deleteForumTopic (I test it in the fixture)
    • unpinAllForumTopicMessages (test created but triggerstelegram.error.BadRequest: Chat_not_modified.)
    • getForumTopicIconStickers
  • add filters

@lemontree210
Copy link
MemberAuthor

lemontree210 commentedNov 11, 2022
edited
Loading

Actually, again, maybe the tests are worth adding when the methods are there, so it might make sense to review this as it is, then hopefully merge, and then we'll add tests with real methods.

@lemontree210lemontree210 marked this pull request as ready for reviewNovember 11, 2022 14:41
@lemontree210lemontree210 marked this pull request as draftNovember 11, 2022 14:46
@harshil21harshil21 added this to thev20.0a5 milestoneNov 11, 2022
@harshil21harshil21 added the ⚙️ bot-apiaffected functionality: bot-api labelNov 11, 2022
…Created`+ change docstring for the modulewill add tests for `ForumTopic` later on
@lemontree210lemontree210 marked this pull request as ready for reviewNovember 12, 2022 12:04
@lemontree210
Copy link
MemberAuthor

This seems ready to be merged if there are no other comments.

Copy link
Member

@harshil21harshil21 left a comment

Choose a reason for hiding this comment

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

Now that all 7 forum methods have been implemented upstream,test_forum.py should be updated to test that.

Also we can add filters for the new status messages (ForumTopicCreated, etc). Seefilters.StatusUpdate as examples on how to add them, it's fairly straightforward.

@lemontree210
Copy link
MemberAuthor

lemontree210 commentedNov 17, 2022
edited
Loading

I'm having trouble adding a test forForumTopicCreated. My idea is that I should create a topic, then get updates, check the lastMessage and make sure it contains a service message inforum_topic_created attribute with the correct topic name. Somehow it doesn't work though, which maybe depends on howbot fixture works. (I do get service messages, but old ones.)

I tried to see how it was done for other classes representing service messages, but tests for classes likeVideoChatScheduled,MessageAutoDeleteTimerChanged and others only seem to test slots, equality etc., but not the fact of the service message actually being issued. So I'm struggling to find any relevant examples to follow here :)

@Bibo-JoshiBibo-Joshi merged commit0cc1d03 intoapi_6.3_updateNov 18, 2022
@Bibo-JoshiBibo-Joshi deleted the new_classes_for_api_6.3 branchNovember 18, 2022 15:57
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 25, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@Bibo-JoshiBibo-JoshiBibo-Joshi left review comments

@harshil21harshil21harshil21 approved these changes

Assignees
No one assigned
Labels
⚙️ bot-apiaffected functionality: bot-api
Projects
None yet
Milestone
v20.0a5
Development

Successfully merging this pull request may close these issues.

3 participants
@lemontree210@Bibo-Joshi@harshil21

[8]ページ先頭

©2009-2025 Movatter.jp