Repository navigation
Commit 78afd04
committed
_notify_next_handlers drops messages if empty handler list
After calling
clear_step_handler(...)
code:
self.next_step_handlers[chat_id] = []
left the key in next_step_handlers.
When a next message arrives, the old handler executes nothing (no handlers), but still remove message from message queue:
new_messages.pop(i).
Updated to pop message only when there are real handlers in the list.1 parent 9c79ba2 commit 78afd04
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | | - | |
1159 | | - | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1160 | 1162 | | |
1161 | | - | |
1162 | 1163 | | |
1163 | 1164 | | |
1164 | 1165 | | |
| |||
0 commit comments