Skip to content

Commit 392d2d9

Browse files
committed
RE1-T112 fixes
1 parent 1c2112b commit 392d2d9

2 files changed

Lines changed: 13 additions & 20 deletions

File tree

Core/Resgrid.Services/WeatherAlertService.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,19 @@ public async Task SendPendingNotificationsAsync(CancellationToken ct = default)
363363
SentOn = DateTime.UtcNow,
364364
SystemGenerated = true,
365365
IsBroadcast = true,
366-
Type = 0,
367-
Recipients = string.Join(",", members.Select(m => m.UserId))
366+
Type = 0
368367
};
369368

370-
// Use SendMessageAsync which saves AND enqueues for push/SMS/email delivery
371-
var sent = await _messageService.SendMessageAsync(
372-
message, "Weather Alert System", departmentId, true, ct);
373-
374-
if (sent)
369+
foreach (var member in members)
375370
{
376-
alert.SystemMessageId = message.MessageId;
371+
if (member.UserId != senderId)
372+
message.AddRecipient(member.UserId);
377373
}
374+
375+
var savedMessage = await _messageService.SaveMessageAsync(message, ct);
376+
await _messageService.SendMessageAsync(savedMessage, "Weather Alert System", departmentId, false, ct);
377+
378+
alert.SystemMessageId = savedMessage.MessageId;
378379
}
379380
}
380381
catch (Exception ex)

Web/Resgrid.Web/Filters/RequireActivePlanFilter.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,14 @@ public class RequireActivePlanFilter : IAsyncActionFilter
1919
// Actions that are always reachable regardless of plan status
2020
private static readonly string[] ExemptControllers = new[]
2121
{
22-
"account"
22+
"account",
23+
"subscription"
2324
};
2425

2526
private static readonly string[] ExemptActions = new[]
2627
{
27-
"selectregistrationplan",
28-
"getstripesession",
29-
"getstripeupdate",
30-
"stripeprocessing",
31-
"paymentcomplete",
32-
"paymentpending",
33-
"paymentfailed",
34-
"logstriperesponse",
35-
"stripebillinginfoupdatesuccess",
36-
"getpaddlecheckout",
37-
"paddleprocessing"
28+
"topiconsarea",
29+
"getsearchresults"
3830
};
3931

4032
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)

0 commit comments

Comments
 (0)