diff --git a/Dockerfile b/Dockerfile index b87db1c7afa68156172ed332cbd8d2c119cdd772..a5e19bb835e2cd41909a559e0f685ec8c5da1a7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -192,6 +192,7 @@ RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/user_ldap/lib/User_LDAP.php -i $ RUN patch -u ${BASE_DIR}/lib/private/User/Manager.php -i ${TMP_PATCH_DIR}/025-optimize-get-by-email.patch RUN patch -u ${BASE_DIR}/apps/dav/lib/Connector/Sabre/Principal.php -i ${TMP_PATCH_DIR}/027-displayname-user-leak-dav.patch RUN patch -u ${BASE_DIR}/apps/dav/lib/HookManager.php -i ${TMP_PATCH_DIR}/028-default-task-calendar.patch +RUN patch -u ${BASE_DIR}/3rdparty/sabre/dav/lib/CalDAV/Plugin.php -i ${TMP_PATCH_DIR}/029-add-jitsi-link.patch RUN rm -rf ${TMP_PATCH_DIR} RUN curl -fsSL -o ldap_write_support.tar.gz \ diff --git a/patches/029-add-jitsi-link.patch b/patches/029-add-jitsi-link.patch new file mode 100644 index 0000000000000000000000000000000000000000..fbed6b1f5efc12125e9ef1033d97df92c924263c --- /dev/null +++ b/patches/029-add-jitsi-link.patch @@ -0,0 +1,29 @@ +From: Avinash Gusain +Date: Mon, 24 July 2023 15:43:00 +0530 +Subject: [PATCH] Add jitsi link in location + +This patch creates a jitsi link in location if it is empty and attendee is added + +--- 3rdparty/sabre/dav/lib/CalDAV/Plugin.php 2023-07-25 13:25:07.893734832 +0530 ++++ 3rdparty/sabre/dav/lib/CalDAV/Plugin-new.php 2023-07-25 13:26:31.933735174 +0530 +@@ -787,6 +787,20 @@ + $data = stream_get_contents($data); + } + ++ // If attendee exist and location not exist ++ if (strpos($data, 'ATTENDEE;') !== false && strpos($data, 'LOCATION:') === false) { ++ $url = 'https://meet.jit.si/'; ++ $chars = '0123456789abcdefghijklmnopqrstuvwxyz'; ++ $result = ''; ++ $length = 8; ++ for ($i = $length; $i > 0; --$i) { ++ $result .= $chars[rand(0, strlen($chars) - 1)]; ++ } ++ $randomString = $result . date('dmy'); ++ $url = $url . $randomString; ++ $data = preg_replace('/(SUMMARY:[^\r\n]*)/', "$1\nLOCATION: $url", $data); ++ } ++ + $before = $data; + + try {