Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

522 B
Raw Blame
import { publishResourceEvent } from '@/server/services/resourceEvents';
import { after } from '@/server/utils/scheduleAfterResponse';

export type AcceptanceChange = 'comments' | 'session';

export const notifyAcceptance = (acceptanceId: string, change: AcceptanceChange, actorId = '') =>
  after(() =>
    publishResourceEvent(
      { id: acceptanceId, type: 'acceptance' },
      {
        actorId,
        type: change === 'comments' ? 'acceptance.commentsChanged' : 'acceptance.sessionChanged',
      },
    ),
  );