Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51be3e99 authored by Ronak Patel's avatar Ronak Patel
Browse files

added patch to add new file

parent feba7942
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -160,7 +160,8 @@ RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/anyof/allof/g' js/calendar.

# UserConfigChangedEvent Ref: https://github.com/nextcloud/server/pull/42039

RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/035-user-config-change-event.patch
RUN cd ${BASE_DIR} && patch -p1 < ${TMP_PATCH_DIR}/035-user-config-change-event.patch
RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/036-user-config-changed-event-new-file.patch

# Set default widgets to calendar, tasks and notes
RUN sed -i 's/recommendations,spreed,mail,calendar/calendar,tasks,notes/' ${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php
+70 −0
Original line number Diff line number Diff line
--- /dev/null
+++ ./lib/public/User/Events/UserConfigChangedEvent.php
@@ -0,0 +1 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2023 Murena SAS <akhil.potukuchi.ext@murena.com>
+ *
+ * @author Murena SAS <akhil.potukuchi.ext@murena.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\User\Events;
+
+use OCP\EventDispatcher\Event;
+
+class UserConfigChangedEvent extends Event {
+    private string $userId;
+    private string $appId;
+    private string $key;
+    private mixed $value;
+    private mixed $oldValue;
+
+    public function __construct(string $userId, string $appId, string $key, mixed $value, mixed $oldValue = null) {
+        parent::__construct();
+        $this->userId = $userId;
+        $this->appId = $appId;
+        $this->key = $key;
+        $this->value = $value;
+        $this->oldValue = $oldValue;
+    }
+
+    public function getUserId(): string {
+        return $this->userId;
+    }
+
+    public function getAppId(): string {
+        return $this->appId;
+    }
+
+    public function getKey(): string {
+        return $this->key;
+    }
+
+    public function getValue() {
+        return $this->value;
+    }
+
+    public function getOldValue() {
+        return $this->oldValue;
+    }
+}
\ No newline at end of file