diff --git a/src/Ombi.Notifications/Agents/EmailNotification.cs b/src/Ombi.Notifications/Agents/EmailNotification.cs index ae0964f68..cb96fcdb6 100644 --- a/src/Ombi.Notifications/Agents/EmailNotification.cs +++ b/src/Ombi.Notifications/Agents/EmailNotification.cs @@ -115,7 +115,7 @@ namespace Ombi.Notifications.Agents var plaintext = await LoadPlainTextMessage(NotificationType.NewRequest, model, settings); message.Other.Add("PlainTextBody", plaintext); - foreach (var recipient in (await GetPowerUsers()).DistinctBy(x => x.Email)) + foreach (var recipient in (await GetPrivilegedUsers()).DistinctBy(x => x.Email)) { if (recipient.Email.IsNullOrEmpty()) { diff --git a/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs b/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs index 6f94d14c0..9df7c6a94 100644 --- a/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs +++ b/src/Ombi.Notifications/Agents/LegacyMobileNotification.cs @@ -59,7 +59,7 @@ namespace Ombi.Notifications.Agents }; // Get admin devices - var playerIds = await GetAdmins(); + var playerIds = await GetPrivilegedUsersPlayerIds(); await Send(playerIds, notification, settings, model, true); } @@ -243,14 +243,14 @@ namespace Ombi.Notifications.Agents private async Task> GetAdmins() { - return await UsersToPlayerIds(await _userManager.GetUsersInRoleAsync(OmbiRoles.Admin)); + return await GetNotificationRecipients(await _userManager.GetUsersInRoleAsync(OmbiRoles.Admin)); } - private async Task> GetPowerUsersPlayerIds() + private async Task> GetPrivilegedUsersPlayerIds() { - return await UsersToPlayerIds(await GetPowerUsers()); + return await GetNotificationRecipients(await GetPrivilegedUsers()); } - private async Task> UsersToPlayerIds(IEnumerable users) + private async Task> GetNotificationRecipients(IEnumerable users) { var adminUsers = users.Select(x => x.Id).ToList(); diff --git a/src/Ombi.Notifications/Agents/MobileNotification.cs b/src/Ombi.Notifications/Agents/MobileNotification.cs index 5cde25b05..0d21f39a5 100644 --- a/src/Ombi.Notifications/Agents/MobileNotification.cs +++ b/src/Ombi.Notifications/Agents/MobileNotification.cs @@ -62,7 +62,7 @@ namespace Ombi.Notifications.Agents }; // Get admin devices - var playerIds = await GetAdmins(); + var playerIds = await GetPrivilegedUsersPlayerIds(); await Send(playerIds, notification, settings, model, true); } @@ -281,14 +281,14 @@ namespace Ombi.Notifications.Agents private async Task> GetAdmins() { - return await UsersToPlayerIds(await _userManager.GetUsersInRoleAsync(OmbiRoles.Admin)); + return await GetNotificationRecipients(await _userManager.GetUsersInRoleAsync(OmbiRoles.Admin)); } - private async Task> GetPowerUsersPlayerIds() + private async Task> GetPrivilegedUsersPlayerIds() { - return await UsersToPlayerIds(await GetPowerUsers()); + return await GetNotificationRecipients(await GetPrivilegedUsers()); } - private async Task> UsersToPlayerIds(IEnumerable users) + private async Task> GetNotificationRecipients(IEnumerable users) { var adminUsers = users.Select(x => x.Id).ToList(); diff --git a/src/Ombi.Notifications/BaseNotification.cs b/src/Ombi.Notifications/BaseNotification.cs index 2de99cdf3..9397767bf 100644 --- a/src/Ombi.Notifications/BaseNotification.cs +++ b/src/Ombi.Notifications/BaseNotification.cs @@ -214,7 +214,7 @@ namespace Ombi.Notifications .FirstOrDefault(x => x.Agent == agent && x.UserId == userId); } - protected async Task> GetPowerUsers() + protected async Task> GetPrivilegedUsers() { IEnumerable recipients = await _userManager.GetUsersInRoleAsync(OmbiRoles.Admin); recipients = recipients.Concat(await _userManager.GetUsersInRoleAsync(OmbiRoles.PowerUser));