feat(notifications): emit at maintenance/turn/sync/reauth events
This commit is contained in:
@@ -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;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user