-
-
Notifications
You must be signed in to change notification settings - Fork 460
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
feat!: Add view.parent
and store view.message
on receiving Interaction for a component
#2036
feat!: Add view.parent
and store view.message
on receiving Interaction for a component
#2036
Conversation
Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
view._parent
and store view.message
on receiving Interaction for a componentview._parent
and store view.message
on receiving Interaction for a component
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2036 +/- ##
==========================================
- Coverage 33.25% 33.24% -0.02%
==========================================
Files 97 97
Lines 19027 19033 +6
==========================================
Hits 6328 6328
- Misses 12699 12705 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
view._parent
and store view.message
on receiving Interaction for a componentview.parent
and store view.message
on receiving Interaction for a component
Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
Summary
Added a
view.parent
attribute to store the original Interaction object the view was sent with.view.message
is now set when an Interaction for any component of the view is received.This saves the unnecessary call to
interaction.original_response()
. The defaulton_timeout
method uses theedit
methods offered byMessage
,InteractionMessage
orInteraction
(as added in #2026)Breaking change -
view.message
is not available on timeout if the view was sent usingInteractionResponse.send_message
. Instead, use the methods offered byview.parent
.Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.