Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Entity notifications and Realtime delivery of notification #8366


User avatar
0
admin@SYNTAQ created

I have successfully implemented a notification for a custom Entity using the subscription model . The notification shows to the user when the page is refreshed. However I want the notification to be delivered realtime and are not sure of how to proceed. Can you advise the steps I am missing?

I have tried everthing as discussed in this article https://aspnetboilerplate.com/Pages/Documents/Notification-System

Thanks,


4 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Show your Publish call.

  • User Avatar
    0
    admin@SYNTAQ created

    Thanks,

    User Id 3 is hardwired (but is the user with the subscription to this notification). The notification shows to user 3 if the page is refreshed

            var userIds = new List<UserIdentifier>();
            userIds.Add(new UserIdentifier(null, 3));
    
            var messagecontent = "Test";
            var message = new MessageNotificationData($"Item Updated. {messagecontent}");
    
            await _notificationPublisher.PublishAsync(
                AppNotificationNames.ScheduleItemUpdated,
                message,
                new EntityIdentifier(typeof(TeamScheduleItem), 
                (Guid)input.Id), 
                userIds: userIds.ToArray()
            );
    
  • User Avatar
    0
    aaron created
    Support Team

    Duplicate of aspnetboilerplate/aspnetboilerplate#5230

    The fix will be released in ABP v5.2.

    Meanwhile, you can subclass SignalRRealTimeNotifier and replace it in Configuration.Notifications.Notifiers.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because of no recent activity. Please create a new issue if you are still having this problem.