-
Notifications
You must be signed in to change notification settings - Fork 295
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
Conversation
) | ||
|
||
if ( | ||
hasattr(turn_context.activity, "type") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
No description provided.