示例#1
0
 private async Task SendNotificationToUser(string userId, bool accept, string groupName, bool isInvited)
 {
     if (accept)
     {
         if (isInvited)
         {
             await notifier.Push(NotificationMessages.GroupJoinedNotification(groupName),
                                 NotificationType.GroupJoined);
         }
         else
         {
             await notifier.Push(NotificationMessages.GroupInviteAcceptedNotification(groupName), userId,
                                 NotificationType.GroupInviteAccepted);
         }
     }
     else
     {
         if (!isInvited)
         {
             await notifier.Push(NotificationMessages.GroupInviteDeniedNotification(groupName), userId,
                                 NotificationType.GroupInviteDenied);
         }
     }
 }