diff --git a/appinfo/info.xml b/appinfo/info.xml
index f0111f29e2cfbdba95ccf3eeb3cb0308c93ffdc5..59666f34403eec86d13f2f30f8b730cf5da73aba 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -20,9 +20,6 @@
Anna Larch
Nextcloud Groupware Team
Calendar
-
-
-
https://docs.nextcloud.com/server/latest/user_manual/en/groupware/calendar.html
https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 3156b97c2879cea34af27799d8d801b19e2c68de..39c29d82f8a5c1336b34b47178204ee36dee0e32 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace OCA\Calendar\AppInfo;
use OCA\Calendar\Dashboard\CalendarWidget;
-use OCA\Calendar\Dav\BeforeCreateFilePlugin;
use OCA\Calendar\Listener\UserDeletedListener;
use OCA\Calendar\Middleware\InvitationMiddleware;
use OCA\Calendar\Notification\Notifier;
@@ -36,7 +35,6 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\BackgroundJob\IJobList;
use OCP\Calendar\IManager;
use OCP\Defaults;
-use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IL10N;
@@ -45,7 +43,6 @@ use OCP\IRequest;
use OCP\IUserManager;
use OCP\L10N\IFactory as L10NFactory;
use OCP\Mail\IMailer;
-use OCP\SabrePluginEvent;
use OCP\User\Events\UserDeletedEvent;
use function method_exists;
@@ -129,16 +126,5 @@ class Application extends App implements IBootstrap {
// executed in the order that it is registered
$containerinvite->registerMiddleware("InvitationMiddleware");
-
- $serverContainer = $context->getServerContainer();
- $eventDispatcher = $serverContainer->get(IEventDispatcher::class);
- $eventDispatcher->addListener('OCA\DAV\Connector\Sabre::addPlugin', function (SabrePluginEvent $event) use ($context) {
- $eventServer = $event->getServer();
- if ($eventServer !== null) {
- $plugin = $context->getAppContainer()->get(BeforeCreateFilePlugin::class);
- $eventServer->addPlugin($plugin);
- }
- });
-
}
}
diff --git a/lib/Dav/BeforeCreateFilePlugin.php b/lib/Dav/BeforeCreateFilePlugin.php
deleted file mode 100644
index 373fa13f3f4f5de87815f9d1654df7bf180fa3d4..0000000000000000000000000000000000000000
--- a/lib/Dav/BeforeCreateFilePlugin.php
+++ /dev/null
@@ -1,109 +0,0 @@
-server = $server;
- $server->on('beforeCreateFile', [$this, 'beforeCreateFile']);
- $server->on('beforeWriteContent', [$this, 'beforeWriteContent']);
- }
-
-
-
- /**
- * Assign jitsi link to location
- *
- * @param string $uri target file URI
- * @param resource $data data
- * @param INode $parent Sabre Node
- * @param bool $modified modified
- * @return
- */
-
- public function beforeCreateFile($uri, &$data, INode $parent, &$modified) {
- if (is_resource($data)) {
- $data = stream_get_contents($data);
- }
- // Parse the data as a vCalendar object using Sabre\VObject.
- try {
- $vCalendar = Reader::read($data);
- } catch (\Exception $e) {
- // The data is not a valid vCalendar object.
- return;
- }
- $this->processEventData($data);
-
- }
-
- /**
- * Assign jitsi link to location
- *
- * @param string $uri target file URI
- * @param INode $parent Sabre Node
- * @param resource $data data
- * @param bool $modified modified
- * @return
- */
-
- public function beforeWriteContent($uri, INode $parent, &$data, &$modified) {
- if (is_resource($data)) {
- $data = stream_get_contents($data);
- }
- // Parse the data as a vCalendar object using Sabre\VObject.
- try {
- $vCalendar = Reader::read($data);
- } catch (\Exception $e) {
- // The data is not a valid vCalendar object.
- return;
- }
- $this->processEventData($data);
- }
-
- /**
- * Process event data and assign a Jitsi link to the event location.
- *
- * @param string $data Data
- */
- private function processEventData(&$data) {
- // Check if the data contains 'ATTENDEE;' but not 'LOCATION:'
- if (strpos($data, 'ATTENDEE;') !== false && strpos($data, 'LOCATION:') === false) {
- // Set the base URL for the meeting
- $baseURL = 'https://meet.jit.si/';
-
- // Generate a random alphanumeric string of length 8
- $chars = '0123456789abcdefghijklmnopqrstuvwxyz';
- $randomString = substr(str_shuffle($chars), 0, 8);
-
- // Append the current date to the random string
- $randomString .= date('dmy');
-
- // Create the complete meeting URL
- $meetingURL = $baseURL . $randomString;
-
- // Replace the BEGIN:VEVENT/ with 'BEGIN:VEVENT' followed by 'LOCATION:'
- $data = preg_replace('/BEGIN:VEVENT/', "BEGIN:VEVENT\nLOCATION:$meetingURL", $data);
- }
- }
-}
diff --git a/src/components/Editor/Invitees/InviteesList.vue b/src/components/Editor/Invitees/InviteesList.vue
index 6c9fc197192dfeee99dd0e6db5388e4fe65f2b5b..4f8a47b3ecb68ab57d4c4264412c2c5a035e5fd8 100644
--- a/src/components/Editor/Invitees/InviteesList.vue
+++ b/src/components/Editor/Invitees/InviteesList.vue
@@ -184,7 +184,6 @@ export default {
timezoneId,
organizer: this.$store.getters.getCurrentUserPrincipal,
})
- this.$emit('new-attendee-added', 'added')
},
removeAttendee(attendee) {
this.$store.commit('removeAttendee', {
diff --git a/src/components/Editor/Properties/PropertyTextLocation.vue b/src/components/Editor/Properties/PropertyTextLocation.vue
index d96b6f7eacce609e4d60870479880de7e7aa9b10..b03d24da06c4af654cda343bebae53fe2854e9fb 100644
--- a/src/components/Editor/Properties/PropertyTextLocation.vue
+++ b/src/components/Editor/Properties/PropertyTextLocation.vue
@@ -74,28 +74,6 @@ function isValidHttpUrl(string) {
}
return url.protocol === 'http:' || url.protocol === 'https:'
}
-/**
- *
- * @param length
- * @param chars
- */
-function generateRandomString(length, chars) {
- let result = ''
- for (let i = length; i > 0; --i) { result += chars[Math.floor(Math.random() * chars.length)] }
- const todaynow = new Date()
- result = result + todaynow.getDate() + todaynow.getMonth() + todaynow.getFullYear().toString().substr(-2)
- return result
-}
-/**
- *
- */
-function JitsiUrlGenerator() {
- let url = 'https://meet.jit.si/'
- const charstr = '0123456789abcdefghijklmnopqrstuvwxyz'
- const randomString = generateRandomString(8, charstr)
- url = url + randomString
- return url
-}
/**
* @param el
@@ -184,23 +162,6 @@ export default {
this.vshow2 = false
this.vshow1 = true
},
- addJitsiUrl() {
- if (typeof this.value !== 'string') {
- this.$emit('update:value', JitsiUrlGenerator())
- this.visibleValue = true
- this.clearUrl = true
- this.vshow2 = true
- this.vshow1 = false
- } else if (this.value === '') {
- this.$emit('update:value', JitsiUrlGenerator())
- this.visibleValue = true
- this.clearUrl = true
- this.vshow2 = true
- this.vshow1 = false
- } else {
- this.visibleValue = this.clearUrl = isValidHttpUrl(this.value.trim())
- }
- },
},
}
diff --git a/src/views/EditSidebar.vue b/src/views/EditSidebar.vue
index 31c74539a381df4ac823d9dae8d2c61a283c6e9c..020731aa8a3a4619d6015fbbdc0dad40a023968f 100644
--- a/src/views/EditSidebar.vue
+++ b/src/views/EditSidebar.vue
@@ -123,8 +123,7 @@