diff --git a/Core/Resgrid.Services/CommunicationService.cs b/Core/Resgrid.Services/CommunicationService.cs index 3e35136e..ddb85467 100644 --- a/Core/Resgrid.Services/CommunicationService.cs +++ b/Core/Resgrid.Services/CommunicationService.cs @@ -526,7 +526,8 @@ private async Task CanSendToUser(string userId, int departmentId) var supressStaffingInfo = await _departmentSettingsService.GetDepartmentStaffingSuppressInfoAsync(departmentId); var lastUserStaffing = await _userStateService.GetLastUserStateByUserIdAsync(userId); - if (lastUserStaffing == null && supressStaffingInfo != null) + // Looks like this was a bug, lastUserStaffing was going through here == null. -SJ + if (lastUserStaffing != null && supressStaffingInfo != null) { if (supressStaffingInfo.EnableSupressStaffing) { diff --git a/Core/Resgrid.Services/QueueService.cs b/Core/Resgrid.Services/QueueService.cs index a3cc012b..fc6b5e7f 100644 --- a/Core/Resgrid.Services/QueueService.cs +++ b/Core/Resgrid.Services/QueueService.cs @@ -119,8 +119,8 @@ public async Task> GetAllPendingDeleteDepartmentQueueItemsAsync( if (!String.IsNullOrWhiteSpace(mqi.Message.ReceivingUserId)) { var dm = await _departmentsService.GetDepartmentMemberAsync(mqi.Message.ReceivingUserId, mqi.DepartmentId); - string departmentNumber = await _departmentSettingsService.GetTextToCallNumberForDepartmentAsync(dm.DepartmentId); - mqi.DepartmentTextNumber = departmentNumber; + //string departmentNumber = await _departmentSettingsService.GetTextToCallNumberForDepartmentAsync(dm.DepartmentId); + //mqi.DepartmentTextNumber = departmentNumber; if (mqi.Message.ReceivingUser == null) { @@ -133,8 +133,8 @@ public async Task> GetAllPendingDeleteDepartmentQueueItemsAsync( else if (!String.IsNullOrWhiteSpace(mqi.Message.SendingUserId)) { var dm = await _departmentsService.GetDepartmentMemberAsync(mqi.Message.SendingUserId, mqi.DepartmentId); - string departmentNumber = await _departmentSettingsService.GetTextToCallNumberForDepartmentAsync(dm.DepartmentId); - mqi.DepartmentTextNumber = departmentNumber; + //string departmentNumber = await _departmentSettingsService.GetTextToCallNumberForDepartmentAsync(dm.DepartmentId); + //mqi.DepartmentTextNumber = departmentNumber; } return await _outboundQueueProvider.EnqueueMessage(mqi); diff --git a/Core/Resgrid.Services/SubscriptionsService.cs b/Core/Resgrid.Services/SubscriptionsService.cs index 57558398..5e4f946d 100644 --- a/Core/Resgrid.Services/SubscriptionsService.cs +++ b/Core/Resgrid.Services/SubscriptionsService.cs @@ -388,31 +388,10 @@ public bool CanPlanSendMessageSms(int planId) { if (!String.IsNullOrWhiteSpace(Config.SystemBehaviorConfig.BillingApiBaseUrl) && !String.IsNullOrWhiteSpace(Config.ApiConfig.BackendInternalApikey)) { - if (planId == 4 // Professional - || planId == 5 // Ultimate - || planId == 9 // Unlimited - || planId == 10 // Enterprise - || planId == 14 // Professional Monthly - || planId == 15 // Ultimate Monthly - || planId == 16 // Enterprise Monthly - || planId == 17 // Enterprise+ - || planId == 18 // Enterprise+ Monthly - || planId == 20 // Univeral - || planId == 21 // Univeral Monthly - || planId == 26 // Professional - || planId == 27 // Professional Monthly - || planId == 28 // Ultimate - || planId == 29 // Ultimate Monthly - || planId == 30 // Enterprise - || planId == 31 // Enterprise Monthly - || planId == 32 // Enterprise+ - || planId == 32 // Enterprise+ Monthly - || planId == 34 // Unified - || planId == 35 // Unified Monthly - ) - return true; - - return false; + if (planId == 1) + return false; + + return true; } return true; diff --git a/Providers/Resgrid.Providers.Bus/OutboundQueueProvider.cs b/Providers/Resgrid.Providers.Bus/OutboundQueueProvider.cs index 76daee8d..3cf4a84e 100644 --- a/Providers/Resgrid.Providers.Bus/OutboundQueueProvider.cs +++ b/Providers/Resgrid.Providers.Bus/OutboundQueueProvider.cs @@ -18,42 +18,27 @@ public OutboundQueueProvider() public async Task EnqueueCall(CallQueueItem callQueue) { - if (SystemBehaviorConfig.ServiceBusType == ServiceBusTypes.Rabbit) - return await _rabbitOutboundQueueProvider.EnqueueCall(callQueue); - - return false; + return await _rabbitOutboundQueueProvider.EnqueueCall(callQueue); } public async Task EnqueueMessage(MessageQueueItem messageQueue) { - if (SystemBehaviorConfig.ServiceBusType == ServiceBusTypes.Rabbit) - return await _rabbitOutboundQueueProvider.EnqueueMessage(messageQueue); - - return false; + return await _rabbitOutboundQueueProvider.EnqueueMessage(messageQueue); } public async Task EnqueueDistributionList(DistributionListQueueItem distributionListQueue) { - if (SystemBehaviorConfig.ServiceBusType == ServiceBusTypes.Rabbit) - return await _rabbitOutboundQueueProvider.EnqueueDistributionList(distributionListQueue); - - return false; + return await _rabbitOutboundQueueProvider.EnqueueDistributionList(distributionListQueue); } public async Task EnqueueNotification(NotificationItem notificationQueue) { - if (SystemBehaviorConfig.ServiceBusType == ServiceBusTypes.Rabbit) - return await _rabbitOutboundQueueProvider.EnqueueNotification(notificationQueue); - - return false; + return await _rabbitOutboundQueueProvider.EnqueueNotification(notificationQueue); } public async Task EnqueueShiftNotification(ShiftQueueItem shiftQueueItem) { - if (SystemBehaviorConfig.ServiceBusType == ServiceBusTypes.Rabbit) - return await _rabbitOutboundQueueProvider.EnqueueShiftNotification(shiftQueueItem); - - return false; + return await _rabbitOutboundQueueProvider.EnqueueShiftNotification(shiftQueueItem); } public async Task EnqueueAuditEvent(AuditEvent auditEvent)