8000 Conversation Update Scenario by Virtual-Josh · Pull Request #431 · microsoft/botbuilder-python · GitHub
[go: up one dir, main page]

Skip to content

Conversation Update Scenario #431

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 13, 2019
Merged

Conversation Update Scenario #431

merged 7 commits into from
Nov 13, 2019

Conversation

Virtual-Josh
Copy link
Contributor

No description provided.

@Virtual-Josh Virtual-Josh requested a review from axelsrz November 12, 2019 23:52
@Virtual-Josh Virtual-Josh added R7 Release 7 - December 10th, 2019 teams labels Nov 12, 2019
@Virtual-Josh Virtual-Josh changed the title Josh/activity handler Conversation Update Scenario Nov 12, 2019
)

if (
hasattr(turn_context.activity, "type")
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious about the logic here: if the activity doesn't have a type attribute at all... should it pass? Because with this conditional is not gonna raise an error until it gets to line 34 and you try to access turn_context.activity.type

I believe that (and correct me if you had other intention) you're trying to validate that turn_context.activity.type exists and is not None, you can achieve that by
if not getattr(turn_context.activity, "type", None): ...(raise your error)

I don't remember if you did a similar validation in your past PR but please take a look to make sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will resolve this in a different PR

@Virtual-Josh Virtual-Josh merged commit a590910 into Teams Nov 13, 2019
@Virtual-Josh Virtual-Josh deleted the josh/ActivityHandler branch November 21, 2019 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R7 Release 7 - December 10th, 2019
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0