feat(bot): add safe group unsetup flow

This commit is contained in:
2026-03-11 06:08:34 +04:00
parent 1b8c6e87f6
commit b6b6f9e1b8
25 changed files with 495 additions and 0 deletions

View File

@@ -89,6 +89,19 @@ function createPromptRepository(): TelegramPendingActionRepository {
},
async clearPendingAction(telegramChatId, telegramUserId) {
store.delete(`${telegramChatId}:${telegramUserId}`)
},
async clearPendingActionsForChat(telegramChatId, action) {
for (const [key, record] of store.entries()) {
if (!key.startsWith(`${telegramChatId}:`)) {
continue
}
if (action && record.action !== action) {
continue
}
store.delete(key)
}
}
}
}
@@ -139,6 +152,7 @@ function createHouseholdConfigurationRepository(): HouseholdConfigurationReposit
: null,
findHouseholdTopicByTelegramContext: async () => null,
listHouseholdTopicBindings: async () => [],
clearHouseholdTopicBindings: async () => {},
listReminderTargets: async () => [],
upsertHouseholdJoinToken: async () => ({
householdId: 'household-1',