mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Notification token on Windows
This commit is contained in:
@@ -12,12 +12,12 @@ describe('renderWindowsToast', () => {
|
||||
avatarPath: 'C:/temp/ab/abcd',
|
||||
body: 'Hi there!',
|
||||
heading: 'Alice',
|
||||
conversationId: 'conversation5',
|
||||
token: 'token',
|
||||
type: NotificationType.Message,
|
||||
});
|
||||
|
||||
const expected =
|
||||
'<toast launch="sgnl://show-conversation?conversationId=conversation5" activationType="protocol"><visual><binding template="ToastImageAndText02"><image id="1" src="file:///C:/temp/ab/abcd" hint-crop="circle"></image><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
'<toast launch="sgnl://show-conversation?token=token" activationType="protocol"><visual><binding template="ToastImageAndText02"><image id="1" src="file:///C:/temp/ab/abcd" hint-crop="circle"></image><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
|
||||
assert.strictEqual(xml, expected);
|
||||
});
|
||||
@@ -26,12 +26,12 @@ describe('renderWindowsToast', () => {
|
||||
const xml = renderWindowsToast({
|
||||
body: 'Hi there!',
|
||||
heading: 'Alice',
|
||||
conversationId: 'conversation5',
|
||||
token: 'token',
|
||||
type: NotificationType.Message,
|
||||
});
|
||||
|
||||
const expected =
|
||||
'<toast launch="sgnl://show-conversation?conversationId=conversation5" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
'<toast launch="sgnl://show-conversation?token=token" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
|
||||
assert.strictEqual(xml, expected);
|
||||
});
|
||||
@@ -40,14 +40,12 @@ describe('renderWindowsToast', () => {
|
||||
const xml = renderWindowsToast({
|
||||
body: 'Hi there!',
|
||||
heading: 'Alice',
|
||||
conversationId: 'conversation5',
|
||||
messageId: 'message6',
|
||||
storyId: 'story7',
|
||||
token: 'token',
|
||||
type: NotificationType.Message,
|
||||
});
|
||||
|
||||
const expected =
|
||||
'<toast launch="sgnl://show-conversation?conversationId=conversation5&messageId=message6&storyId=story7" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
'<toast launch="sgnl://show-conversation?token=token" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
|
||||
assert.strictEqual(xml, expected);
|
||||
});
|
||||
@@ -56,7 +54,7 @@ describe('renderWindowsToast', () => {
|
||||
const xml = renderWindowsToast({
|
||||
body: 'Hi there!',
|
||||
heading: 'Alice',
|
||||
conversationId: 'conversation5',
|
||||
token: 'token',
|
||||
type: NotificationType.IncomingCall,
|
||||
});
|
||||
|
||||
@@ -70,12 +68,12 @@ describe('renderWindowsToast', () => {
|
||||
const xml = renderWindowsToast({
|
||||
body: 'Hi there!',
|
||||
heading: 'Alice',
|
||||
conversationId: 'conversation5',
|
||||
token: 'token',
|
||||
type: NotificationType.IncomingGroupCall,
|
||||
});
|
||||
|
||||
const expected =
|
||||
'<toast launch="sgnl://start-call-lobby?conversationId=conversation5" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
'<toast launch="sgnl://start-call-lobby?token=token" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>';
|
||||
|
||||
assert.strictEqual(xml, expected);
|
||||
});
|
||||
@@ -84,7 +82,7 @@ describe('renderWindowsToast', () => {
|
||||
const xml = renderWindowsToast({
|
||||
body: 'Hi there!',
|
||||
heading: 'Alice',
|
||||
conversationId: 'conversation5',
|
||||
token: 'token',
|
||||
type: NotificationType.IsPresenting,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user