Skip to content

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.

3 participants