Fix error when sending non-interactive views via partial webhooks

This commit is contained in:
Mohammed Aman Jukaku 2025-07-27 23:13:21 +05:30 committed by GitHub
parent e715ad6419
commit 5b81a99b60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1872,7 +1872,7 @@ class Webhook(BaseWebhook):
if wait:
msg = self._create_message(data, thread=thread)
if view is not MISSING and not view.is_finished():
if view is not MISSING and not view.is_finished() and view.is_dispatchable():
message_id = None if msg is None else msg.id
self._state.store_view(view, message_id)