MCPcopy Index your code
hub / github.com/gitify-app/gitify / raiseNativeNotification

Function raiseNativeNotification

src/renderer/utils/system/native.ts:16–36  ·  view source on GitHub ↗
(
  notifications: GitifyNotification[],
)

Source from the content-addressed store, hash-verified

14 * @param notifications - The notifications to surface as a native OS notification.
15 */
16export async function raiseNativeNotification(
17 notifications: GitifyNotification[],
18) {
19 let title: string;
20 let body: string;
21 let url: string | null = null;
22
23 if (notifications.length === 1) {
24 const notification = notifications[0];
25 title = window.gitify.platform.isWindows()
26 ? ''
27 : notification.repository.fullName;
28 body = notification.subject.title;
29 url = await generateGitHubWebUrl(notification);
30 } else {
31 title = APPLICATION.NAME;
32 body = `You have ${notifications.length} notifications`;
33 }
34
35 return window.gitify.raiseNativeNotification(title, body, url ?? undefined);
36}

Callers 1

useNotificationsFunction · 0.90

Calls 1

generateGitHubWebUrlFunction · 0.90

Tested by

no test coverage detected