Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Notification Service #2186

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Fix Notification Service #2186

merged 1 commit into from
Aug 16, 2024

Conversation

Fosol
Copy link
Collaborator

@Fosol Fosol commented Aug 16, 2024

Fixing issues related to notifications. Specifically identifying which users should receive one.

Also including fix for empty reports.

Summary

  • Add DB Migration 1.2.5
  • Update Notification Service

@Fosol Fosol added the bug Something isn't working label Aug 16, 2024
@Fosol Fosol self-assigned this Aug 16, 2024
@@ -27,7 +27,7 @@
<div style="font-size:22px; font-weight:500;"><p>@(Settings.Subject.ShowTodaysDate ? $" {ReportExtensions.GetTodaysDate():dd-MMM-yyyy}" : "")</p></div>
</a>

@if (Content.Count() == 0)
@if (Content.Count() == 0 && !ViewOnWebOnly)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't display this message for a link only report.

<div style="font-size:22px; font-weight:500;"><p>@(Settings.Subject.ShowTodaysDate ? $" {ReportExtensions.GetTodaysDate():dd-MMM-yyyy}" : "")</p></div>
</a>

@if (Content.Count() == 0 && !ViewOnWebOnly)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this line

@@ -307,9 +307,9 @@ private async Task ProcessSourceContentAsync(ConsumeResult<string, SourceContent
if (content != null)
{
if (updateContent)
Logger.LogInformation("Received updated content from TNO. Forcing an update to the MMI Content : {Source}:{Title}", model.Source, model.Title);
Logger.LogInformation("Received updated content. Forcing an update to the MMI Content : {Source}:{Title}", model.Source, model.Title);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has nothing to do with TNO

/// <param name="notification"></param>
/// <param name="content"></param>
/// <returns></returns>
private async Task<IEnumerable<API.Areas.Services.Models.Notification.UserModel>> GetNotificationSubscribersAsync(API.Areas.Services.Models.Notification.NotificationModel notification, API.Areas.Services.Models.Content.ContentModel content)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to duplicate subscriber issues, but there was a bug with distribution. I have also moved this logic from the NotificationValidator to here.

@Fosol Fosol merged commit 3ccfec5 into bcgov:dev Aug 16, 2024
2 checks passed
@Fosol Fosol deleted the image branch August 16, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant