From a78e19ea769990f3587a7bff2d497db92cb2c314 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Tue, 4 Feb 2020 22:15:33 +0100 Subject: [PATCH] Move Notify::TYPE_POKE --- boot.php | 1 - include/enotify.php | 2 +- mod/settings.php | 2 +- src/Model/Notify/Type.php | 2 ++ src/Protocol/DFRN.php | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index f7d7c298f..84d430034 100644 --- a/boot.php +++ b/boot.php @@ -140,7 +140,6 @@ define('MAX_LIKERS', 75); * Email notification options * @{ */ -define('NOTIFY_POKE', 512); define('NOTIFY_SHARE', 1024); define('NOTIFY_SYSTEM', 32768); diff --git a/include/enotify.php b/include/enotify.php index d3c4c74f3..31983d894 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -242,7 +242,7 @@ function notification($params) $itemlink = $params['link']; } - if ($params['type'] == NOTIFY_POKE) { + if ($params['type'] == Notify\Type::POKE) { $subject = $l10n->t('[Friendica:Notify] %1$s poked you', $params['source_name']); $preamble = $l10n->t('%1$s poked you at %2$s', $params['source_name'], $sitename); diff --git a/mod/settings.php b/mod/settings.php index 9a8a8ba27..69d9c77c9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1237,7 +1237,7 @@ function settings_content(App $a) '$notify5' => ['notify5', DI::l10n()->t('You receive a private message'), ($notify & Type::MAIL), Type::MAIL, ''], '$notify6' => ['notify6', DI::l10n()->t('You receive a friend suggestion'), ($notify & Type::SUGGEST), Type::SUGGEST, ''], '$notify7' => ['notify7', DI::l10n()->t('You are tagged in a post'), ($notify & Type::TAG_SELF), Type::TAG_SELF, ''], - '$notify8' => ['notify8', DI::l10n()->t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''], + '$notify8' => ['notify8', DI::l10n()->t('You are poked/prodded/etc. in a post'), ($notify & Type::POKE), Type::POKE, ''], '$desktop_notifications' => ['desktop_notifications', DI::l10n()->t('Activate desktop notifications') , false, DI::l10n()->t('Show desktop popup on new notifications')], diff --git a/src/Model/Notify/Type.php b/src/Model/Notify/Type.php index b329d7696..80e5c4937 100644 --- a/src/Model/Notify/Type.php +++ b/src/Model/Notify/Type.php @@ -29,4 +29,6 @@ class Type * @deprecated */ const TAG_SHARE = 256; + /** @var int Notification about getting poked/prodded/etc. */ + const POKE = 512; } diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index b15816bc7..9269fcc5e 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2137,7 +2137,7 @@ class DFRN // send a notification notification( [ - "type" => NOTIFY_POKE, + "type" => Type::POKE, "notify_flags" => $importer["notify-flags"], "language" => $importer["language"], "to_name" => $importer["username"],