Notification token on Windows

This commit is contained in:
Fedor Indutny
2025-02-03 14:30:19 -08:00
committed by GitHub
parent 74acb3a2dd
commit 22d30ec4eb
10 changed files with 142 additions and 122 deletions

View File

@@ -37,10 +37,8 @@ const Image = (props: { id: string; src: string; 'hint-crop': string }) =>
export function renderWindowsToast({
avatarPath,
body,
conversationId,
heading,
messageId,
storyId,
token,
type,
}: WindowsNotificationData): string {
// Note: with these templates, the first <text> is one line, bolded
@@ -58,13 +56,11 @@ export function renderWindowsToast({
// 2) this also maps to the url-handling in main.ts
if (type === NotificationType.Message || type === NotificationType.Reaction) {
launch = showConversationRoute.toAppUrl({
conversationId,
messageId: messageId ?? null,
storyId: storyId ?? null,
token,
});
} else if (type === NotificationType.IncomingGroupCall) {
launch = startCallLobbyRoute.toAppUrl({
conversationId,
token,
});
} else if (type === NotificationType.IncomingCall) {
launch = showWindowRoute.toAppUrl({});