Skip to content

Commit 8aeb99f

Browse files
committed
fix processing group stack in business chat
1 parent b8e1824 commit 8aeb99f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/aiogram_dialog/context/storage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ def _context_key(self, intent_id: str) -> StorageKey:
129129
def _fixed_stack_id(self, stack_id: str) -> str:
130130
if stack_id != DEFAULT_STACK_ID:
131131
return stack_id
132+
# private chat has chat_id=user_id and no business connection
132133
if self.user_id in (None, self.chat_id):
133-
return stack_id
134+
if self.business_connection_id is None:
135+
return stack_id
134136
return f"<{self.user_id}>"
135137

136138
def _stack_key(self, stack_id: str) -> StorageKey:

0 commit comments

Comments
 (0)