/// <summary> /// Sends event updation notification to the registered users for an event /// </summary> /// <param name="eventDetails">The event details for which update notification needs to be sent to user</param> /// <returns>Returns true if notification sent successfully. Else returns false.</returns> private async Task <bool> SendEventUpdateNotificationAsync(EventEntity eventDetails) { if (eventDetails == null || eventDetails.RegisteredAttendeesCount == 0) { return(false); } var users = eventDetails.GetAttendees(); await this.categoryHelper.BindCategoryNameAsync(new List <EventEntity>() { eventDetails }); // Get user details from DB using user Ids. var registeredAttendees = await this.userConfigurationRepository.GetUserConfigurationsAsync(users); var notificationCard = EventUpdateCard.GetEventUpdateCard(this.localizer, eventDetails, this.botOptions.Value.ManifestId); await this.notificationHelper.SendNotificationToUsersAsync(registeredAttendees, notificationCard); return(true); }