Skip to content

Commit fa6b0ab

Browse files
committed
fix handling tuple states
1 parent 7358c33 commit fa6b0ab

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

telegram/ext/conversationhandler.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def check_update(self, update):
143143
state = self.conversations.get(key)
144144

145145
# Resolve promises
146-
if isinstance(state, tuple):
146+
if isinstance(state, tuple) and len(state) is 2 and isinstance(state[1], Promise):
147147
self.logger.debug('waiting for promise...')
148148

149149
old_state, new_state = state
@@ -220,6 +220,3 @@ def update_state(self, new_state, key):
220220

221221
elif new_state is not None:
222222
self.conversations[key] = new_state
223-
224-
elif isinstance(self.conversations[key], tuple):
225-
self.conversations[key] = self.conversations[key][0]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy