diff --git a/src/main/java/com/vi/appointmentservice/api/calcom/repository/EventTypeRepository.java b/src/main/java/com/vi/appointmentservice/api/calcom/repository/EventTypeRepository.java index ee4bea0..f5a342e 100644 --- a/src/main/java/com/vi/appointmentservice/api/calcom/repository/EventTypeRepository.java +++ b/src/main/java/com/vi/appointmentservice/api/calcom/repository/EventTypeRepository.java @@ -45,9 +45,6 @@ public List getEventTypes4Team(Number teamId) { return result.stream().map(el -> CalcomEventType.asInstance(el)).collect(Collectors.toList()); } - //TODO: move out this repository from here - private UserToConsultantRepository userToConsultantRepository; - /** * A = eventTypeId B = userId */ @@ -178,7 +175,6 @@ public void deleteAllEventTypesOfUser(Long calcomUserId) { String QUERY = "DELETE FROM \"EventType\" WHERE \"userId\"= :userId"; SqlParameterSource parameters = new MapSqlParameterSource("userId", calcomUserId); db.update(QUERY, parameters); - } public void deleteEventType(Long eventTypeId) { diff --git a/src/main/java/com/vi/appointmentservice/api/calcom/service/CalcomLocationsService.java b/src/main/java/com/vi/appointmentservice/api/calcom/service/CalcomLocationsService.java index 1fc93f2..9df0504 100644 --- a/src/main/java/com/vi/appointmentservice/api/calcom/service/CalcomLocationsService.java +++ b/src/main/java/com/vi/appointmentservice/api/calcom/service/CalcomLocationsService.java @@ -14,9 +14,9 @@ public class CalcomLocationsService { private static final String PHONE_CALL_MEETING_MESSAGE = "Die Telefonnummer teilt Ihnen ihr:e Berater:in im Chat mit"; - private static final String VIDEO_CALL = "integrations:daily"; + private static final String VIDEO_CALL = "integrations:jitsi"; - private static final String LINK = "https://app.suchtberatung.digital"; + private static final String LINK = "suchtberatung.digital"; public String resolveLocationType(CalcomBooking booking) { if (IN_PERSON_MEETING_MESSAGE.equals(booking.getLocation())) { @@ -25,14 +25,14 @@ public String resolveLocationType(CalcomBooking booking) { return LocationType.PHONE_CALL.name(); } else if (VIDEO_CALL.equals(booking.getLocation())) { return LocationType.VIDEO_CALL.name(); - } else if (LINK.equals(booking.getLocation())) { + } else if (booking.getLocation().contains(LINK)) { return LocationType.CHAT.name(); } throw new IllegalStateException("Unknown location type"); } public String buildCalcomLocations() { - return "[{\"type\": \"integrations:daily\"}," + return "[{\"type\": \"integrations:jitsi\"}," + "{\"type\": \"inPerson\",\"address\": \"" + IN_PERSON_MEETING_MESSAGE + "\"}," + "{\"link\": \"" + LINK + "\",\"type\": \"link\"}," + "{\"type\": \"userPhone\",\"hostPhoneNumber\": \"" + PHONE_CALL_MEETING_MESSAGE + "\"}]";