Hi,
We are using ORACLE DATABASE.
*Notification to the specific user is working properly. This code is working, When we pass user identity.
public async Task SendMessageAsync(UserIdentifier user, string message, NotificationSeverity severity = NotificationSeverity.Info)
{
await _notificationPublisher.PublishAsync(
"App.SimpleMessage",
new MessageNotificationData(message),
severity: severity,
userIds: new[] { user }
);
}
But, Tenant specific notification has not inserted any data into notification Tables.
public async Task NewTenantRegisteredAsync(Tenant tenant)
{
var notificationData = new LocalizableMessageNotificationData(
new LocalizableString(
"NewTenantRegisteredNotificationMessage",
moneyguruConsts.LocalizationSourceName
)
);
notificationData["tenancyName"] = tenant.TenancyName;
await _notificationPublisher.PublishAsync(AppNotificationNames.NewTenantRegistered, notificationData);
}
//Also this is not working
await _notificationPublisher.PublishAsync(AppNotificationNames.NewTenantRegistered, notificationData);
Please help us to send the tenant-specific notification.(one notification to all user).
Please guide us on this.
Thanks.
5 Answer(s)
-
0
Hi,
This problem is solved in this issue <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2783">https://github.com/aspnetboilerplate/as ... ssues/2783</a>. It will be fixed when you upgrade to ABP v3.3.
Until ABP 3.3. released, you can override UserManager's IsGranted Method and use the code in given issue.
-
0
Hi,
We set multitenancy = false
How can we override UserManager's IsGranted, In this case? :?: Thanks
-
0
You can override UserManager's IsGranted method regardless of whether MultiTenancy is enabled.
-
0
Hi,
After changes in the code, It is working properly. Code :
using (_unitOfWorkManager.Current.SetTenantId(null)) { //Code for tenant notification }
But, This notification sends only for subscribed users. In this case, How can we send notification for all user? (Send sample notification for all users like SendMessageAsync) Thanks
-
0
You can implement your own method and get all clients by _onlineclientmanager.GetAllClients();