Fix wording of undeliverable push notifications

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-08-31 12:42:31 +02:00
parent 809f448ef7
commit 85eb3b2920
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
3 changed files with 5 additions and 3 deletions

View File

@ -151,7 +151,7 @@ class LoginController extends Controller {
if (!is_array($loginMessages)) {
$loginMessages = [[], []];
}
$loginMessages[1][] = $this->l10n->t('This community release of Nextcloud is unsupported and instant notifications are unavailable.');
$loginMessages[1][] = $this->l10n->t('This community release of Nextcloud is unsupported and push notifications are limited.');
}
if (is_array($loginMessages)) {
[$errors, $messages] = $loginMessages;

View File

@ -261,7 +261,9 @@
}
if (!data.isFairUseOfFreePushService) {
messages.push({
msg: t('core', 'This is the unsupported community build of Nextcloud. Given the size of this instance, performance, reliability and scalability cannot be guaranteed. Push notifications have been disabled to avoid overloading our free service. Learn more about the benefits of Nextcloud Enterprise at nextcloud.com/enterprise.'),
msg: t('core', 'This is the unsupported community build of Nextcloud. Given the size of this instance, performance, reliability and scalability cannot be guaranteed. Push notifications are limited to avoid overloading our free service. Learn more about the benefits of Nextcloud Enterprise at {linkstart}https://nextcloud.com/enterprise{linkend}.')
.replace('{linkstart}', '<a target="_blank" rel="noreferrer noopener" class="external" href="https://nextcloud.com/enterprise">')
.replace('{linkend}', '</a>'),
type: OC.SetupChecks.MESSAGE_TYPE_ERROR
});
}

View File

@ -305,7 +305,7 @@ class Manager implements IManager {
* users overload our infrastructure. For this reason we have to rate-limit the
* use of push notifications. If you need this feature, consider using Nextcloud Enterprise.
*/
$isFairUse = $this->subscription->delegateHasValidSubscription() || $this->userManager->countSeenUsers() < 5000;
$isFairUse = $this->subscription->delegateHasValidSubscription() || $this->userManager->countSeenUsers() < 500;
$pushAllowed = $isFairUse ? 'yes' : 'no';
$this->cache->set('push_fair_use', $pushAllowed, 3600);
}