feat(bot): add multi-household reminder delivery

This commit is contained in:
2026-03-09 16:50:57 +04:00
parent 12f33e7aea
commit 16f9981fee
27 changed files with 412 additions and 52 deletions

View File

@@ -59,6 +59,7 @@ function createRepositoryStub() {
getHouseholdTopicBinding: async () => null,
findHouseholdTopicByTelegramContext: async () => null,
listHouseholdTopicBindings: async () => [],
listReminderTargets: async () => [],
upsertHouseholdJoinToken: async (input) =>
({
householdId: household.householdId,

View File

@@ -55,6 +55,9 @@ function createRepositoryStub() {
async listHouseholdTopicBindings() {
return []
},
async listReminderTargets() {
return []
},
async upsertHouseholdJoinToken(input) {
joinToken = {
householdId: household.householdId,

View File

@@ -93,6 +93,9 @@ function createRepositoryStub() {
async listHouseholdTopicBindings(householdId) {
return bindings.get(householdId) ?? []
},
async listReminderTargets() {
return []
},
async upsertHouseholdJoinToken(input) {
const household = [...households.values()].find(

View File

@@ -37,6 +37,7 @@ function createRepository(): HouseholdConfigurationRepository {
getHouseholdTopicBinding: async () => null,
findHouseholdTopicByTelegramContext: async () => null,
listHouseholdTopicBindings: async () => [],
listReminderTargets: async () => [],
upsertHouseholdJoinToken: async () => ({
householdId: household.householdId,
householdName: household.householdName,

View File

@@ -28,6 +28,7 @@ function repository(): HouseholdConfigurationRepository {
getHouseholdTopicBinding: async () => null,
findHouseholdTopicByTelegramContext: async () => null,
listHouseholdTopicBindings: async () => [],
listReminderTargets: async () => [],
upsertHouseholdJoinToken: async () => ({
householdId: 'household-1',
householdName: 'Kojori House',

View File

@@ -22,6 +22,8 @@ class ReminderDispatchRepositoryStub implements ReminderDispatchRepository {
this.lastClaim = input
return this.nextResult
}
async releaseReminderDispatch(): Promise<void> {}
}
describe('createReminderJobService', () => {