feat(notifications): emit at maintenance/turn/sync/reauth events

This commit is contained in:
Gabriel Brown
2026-07-11 16:08:22 -04:00
parent 4eb0c963ff
commit 3766a29871
7 changed files with 270 additions and 2 deletions
+10
View File
@@ -15,6 +15,7 @@ import {
optionalText,
requireText,
} from './model';
import { emitNotification } from './notifications';
const threadSource = v.union(
v.literal('user_request'),
@@ -500,6 +501,15 @@ export const createMaintenanceThread = internalMutation({
jobType: args.jobType,
},
);
await emitNotification(ctx, {
userId: args.ownerId,
kind: 'maintenance_thread',
title: args.title,
body: args.summary,
link: `/threads/${threadId}`,
spoonId: args.spoonId,
threadId,
});
return threadId;
},
});