Skip to content

Commit 0bad7a6

Browse files
authored
[PM-10611] Add missing TaskId to push notification payloads (#5604)
* [PM-10611] Add missing TaskId to push notification payloads * [PM-10611] Fix test
1 parent 39ac933 commit 0bad7a6

File tree

6 files changed

+10
-0
lines changed

6 files changed

+10
-0
lines changed

src/Core/Models/PushNotification.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public class NotificationPushNotification
5656
public Guid? UserId { get; set; }
5757
public Guid? OrganizationId { get; set; }
5858
public Guid? InstallationId { get; set; }
59+
public Guid? TaskId { get; set; }
5960
public string? Title { get; set; }
6061
public string? Body { get; set; }
6162
public DateTime CreationDate { get; set; }

src/Core/NotificationHub/NotificationHubPushNotificationService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ public async Task PushNotificationAsync(Notification notification)
212212
UserId = notification.UserId,
213213
OrganizationId = notification.OrganizationId,
214214
InstallationId = installationId,
215+
TaskId = notification.TaskId,
215216
Title = notification.Title,
216217
Body = notification.Body,
217218
CreationDate = notification.CreationDate,
@@ -263,6 +264,7 @@ public async Task PushNotificationStatusAsync(Notification notification, Notific
263264
UserId = notification.UserId,
264265
OrganizationId = notification.OrganizationId,
265266
InstallationId = installationId,
267+
TaskId = notification.TaskId,
266268
Title = notification.Title,
267269
Body = notification.Body,
268270
CreationDate = notification.CreationDate,

src/Core/Platform/Push/Services/AzureQueuePushNotificationService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ public async Task PushNotificationAsync(Notification notification)
188188
UserId = notification.UserId,
189189
OrganizationId = notification.OrganizationId,
190190
InstallationId = notification.Global ? _globalSettings.Installation.Id : null,
191+
TaskId = notification.TaskId,
191192
Title = notification.Title,
192193
Body = notification.Body,
193194
CreationDate = notification.CreationDate,
@@ -208,6 +209,7 @@ public async Task PushNotificationStatusAsync(Notification notification, Notific
208209
UserId = notification.UserId,
209210
OrganizationId = notification.OrganizationId,
210211
InstallationId = notification.Global ? _globalSettings.Installation.Id : null,
212+
TaskId = notification.TaskId,
211213
Title = notification.Title,
212214
Body = notification.Body,
213215
CreationDate = notification.CreationDate,

src/Core/Platform/Push/Services/NotificationsApiPushNotificationService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public async Task PushNotificationAsync(Notification notification)
201201
UserId = notification.UserId,
202202
OrganizationId = notification.OrganizationId,
203203
InstallationId = notification.Global ? _globalSettings.Installation.Id : null,
204+
TaskId = notification.TaskId,
204205
Title = notification.Title,
205206
Body = notification.Body,
206207
CreationDate = notification.CreationDate,
@@ -221,6 +222,7 @@ public async Task PushNotificationStatusAsync(Notification notification, Notific
221222
UserId = notification.UserId,
222223
OrganizationId = notification.OrganizationId,
223224
InstallationId = notification.Global ? _globalSettings.Installation.Id : null,
225+
TaskId = notification.TaskId,
224226
Title = notification.Title,
225227
Body = notification.Body,
226228
CreationDate = notification.CreationDate,

src/Core/Platform/Push/Services/RelayPushNotificationService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ public async Task PushNotificationAsync(Notification notification)
210210
UserId = notification.UserId,
211211
OrganizationId = notification.OrganizationId,
212212
InstallationId = notification.Global ? _globalSettings.Installation.Id : null,
213+
TaskId = notification.TaskId,
213214
Title = notification.Title,
214215
Body = notification.Body,
215216
CreationDate = notification.CreationDate,
@@ -247,6 +248,7 @@ public async Task PushNotificationStatusAsync(Notification notification, Notific
247248
UserId = notification.UserId,
248249
OrganizationId = notification.OrganizationId,
249250
InstallationId = notification.Global ? _globalSettings.Installation.Id : null,
251+
TaskId = notification.TaskId,
250252
Title = notification.Title,
251253
Body = notification.Body,
252254
CreationDate = notification.CreationDate,

test/Core.Test/NotificationHub/NotificationHubPushNotificationServiceTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ private static NotificationPushNotification ToNotificationPushNotification(Notif
507507
UserId = notification.UserId,
508508
OrganizationId = notification.OrganizationId,
509509
InstallationId = installationId,
510+
TaskId = notification.TaskId,
510511
Title = notification.Title,
511512
Body = notification.Body,
512513
CreationDate = notification.CreationDate,

0 commit comments

Comments
 (0)