Skip to content

Commit

Permalink
Disable nextcloud notifications warning
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Jan 25, 2024
1 parent dedf81a commit 097fd24
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nextcloud/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN apt-get update; \
ca-certificates \
nginx \
wget \
patch \
php8.2 \
php8.2-apcu \
php8.2-curl \
Expand All @@ -37,6 +38,10 @@ RUN apt-get update; \
chown -R www-data /var/www/nextcloud/apps; \
chown -R www-data /var/www/nextcloud/config

# disable nextcloud message about unsupported notifications (because we have more than 5000 users)
ADD disable_notification_message.patch /tmp/disable_notification_message.patch
RUN patch -p1 -d /var/www/nextcloud < /tmp/disable_notification_message.patch

# install richdocuments
ARG RICHDOCUMENTS_VERSION=v8.2.4
RUN mkdir /var/www/nextcloud/apps/richdocuments && \
Expand Down
15 changes: 15 additions & 0 deletions nextcloud/disable_notification_message.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- nextcloud/core/Controller/LoginController.php 2023-10-26 19:21:37.000000000 +0200
+++ nextcloud/core/Controller/LoginController.php 2024-01-25 16:17:32.161511093 +0100
@@ -148,12 +148,6 @@
}

$loginMessages = $this->session->get('loginMessages');
- if (!$this->manager->isFairUseOfFreePushService()) {
- if (!is_array($loginMessages)) {
- $loginMessages = [[], []];
- }
- $loginMessages[1][] = $this->l10n->t('This community release of Nextcloud is unsupported and push notifications are limited.');
- }
if (is_array($loginMessages)) {
[$errors, $messages] = $loginMessages;
$this->initialStateService->provideInitialState('core', 'loginMessages', $messages);

0 comments on commit 097fd24

Please sign in to comment.