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

Make Notification RealTime #9486


User avatar
0
suruat created

I added a few new notifications to AppNotifier.cs. For Example:

public async Task NotifyMemberOfGroupUpdateAsync(User reciever, User invitingUser, long groupId, string message, NotificationType notificationType)
{
    var notificationData = new MessageNotificationData(message);
    notificationData["memberPictureUrl"] = (invitingUser.ProfilePicture != null) ? invitingUser.ProfilePicture.LocationUrl : "";
    notificationData["groupId"] = groupId;
    notificationData["notificationType"] = (int)notificationType;

    await _notificationPublisher.PublishAsync(
        AppNotificationNames.NotifyMemberOfGroupUpdateAsync,
        data: notificationData,
        severity: NotificationSeverity.Info,
        userIds: new[] { reciever.ToUserIdentifier() });
}
    

My question is, when these notifications are published, is it automactically also emitted via signalR or do I need to do somthing to emit it realtime via signalR. I checked the SignalRChatCommunicator.cs file in the Web.Core project and I don't see a signalR method that is sending it. I only see (getChatMessage, getFriendshipRequest, getUserConnectNotification, getUserStateChange, getallUnreadMessagesOfUserRead and getReadStateChange)


2 Answer(s)