diff --git a/CRM.Calendar/Program.cs b/CRM.Calendar/Program.cs index 58f80bc..ae7a481 100644 --- a/CRM.Calendar/Program.cs +++ b/CRM.Calendar/Program.cs @@ -354,7 +354,7 @@ private static void CreateNewEvent(CalendarService service, string calendarId, S Visibility = "default", Organizer = new Event.OrganizerData { - Email = employee.Email, + Email = employee.Facebook, DisplayName = $"{employee.EmpFirstName} {employee.EmpLastName}", }, Reminders = new Event.RemindersData() @@ -470,7 +470,7 @@ private static void UpdateNewEvent(CalendarService service, string calendarId,Sm Visibility = "default", Organizer = new Event.OrganizerData { - Email = employee.Email, + Email = employee.Facebook, DisplayName = $"{employee.EmpFirstName} {employee.EmpLastName}", }, Reminders = new Event.RemindersData() diff --git a/CRM.Services/ActivityService.cs b/CRM.Services/ActivityService.cs index 10f7ce9..93aaf87 100644 --- a/CRM.Services/ActivityService.cs +++ b/CRM.Services/ActivityService.cs @@ -141,8 +141,9 @@ public List GetEmailsFollowID(string activityId) //employeeFollowers.Add(new EmployeeFollowerDto { DisplayName = fullname, Email = emp.Email }); //employeeFollowers.Add(new EventAttendee //{ DisplayName = fullname, Email = emp.Email }); - employeeFollowers.Add(new EventAttendee - { DisplayName = fullname, Email = emp.Facebook }); + if (!string.IsNullOrWhiteSpace(emp.Facebook)) + employeeFollowers.Add(new EventAttendee + { DisplayName = fullname, Email = emp.Facebook }); } return employeeFollowers; }