Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

691 B
Raw Blame
import type { NotificationEventToggles } from '@/lib/api/endpoints/notificationSettings';

// The events a channel can send, matching the inbox notification types.
// Shared by the email and telegram event sections; the label of an event is a
// message under `settings.notifications.events`.
export const NOTIFICATION_EVENTS: (keyof NotificationEventToggles)[] = [
  'assigned',
  'mentioned',
  'commented',
  'state_changed',
];

export function eventsEqual(a: NotificationEventToggles, b: NotificationEventToggles): boolean {
  return (
    a.assigned === b.assigned &&
    a.mentioned === b.mentioned &&
    a.commented === b.commented &&
    a.state_changed === b.state_changed
  );
}