Move Notify::TYPE_SUGGEST

This commit is contained in:
nupplaPhil 2020-02-04 22:11:11 +01:00
parent 9435cc4b88
commit 88dc3efdc9
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
5 changed files with 6 additions and 4 deletions

View File

@ -140,7 +140,6 @@ define('MAX_LIKERS', 75);
* Email notification options * Email notification options
* @{ * @{
*/ */
define('NOTIFY_SUGGEST', 32);
define('NOTIFY_PROFILE', 64); define('NOTIFY_PROFILE', 64);
define('NOTIFY_TAGSELF', 128); define('NOTIFY_TAGSELF', 128);
define('NOTIFY_TAGSHARE', 256); define('NOTIFY_TAGSHARE', 256);

View File

@ -319,7 +319,7 @@ function notification($params)
} }
} }
if ($params['type'] == NOTIFY_SUGGEST) { if ($params['type'] == Notify\Type::SUGGEST) {
$itemlink = $params['link']; $itemlink = $params['link'];
$subject = $l10n->t('[Friendica:Notify] Friend suggestion received'); $subject = $l10n->t('[Friendica:Notify] Friend suggestion received');

View File

@ -1235,7 +1235,7 @@ function settings_content(App $a)
'$notify3' => ['notify3', DI::l10n()->t('Someone writes on your profile wall'), ($notify & Type::WALL), Type::WALL, ''], '$notify3' => ['notify3', DI::l10n()->t('Someone writes on your profile wall'), ($notify & Type::WALL), Type::WALL, ''],
'$notify4' => ['notify4', DI::l10n()->t('Someone writes a followup comment'), ($notify & Type::COMMENT), Type::COMMENT, ''], '$notify4' => ['notify4', DI::l10n()->t('Someone writes a followup comment'), ($notify & Type::COMMENT), Type::COMMENT, ''],
'$notify5' => ['notify5', DI::l10n()->t('You receive a private message'), ($notify & Type::MAIL), Type::MAIL, ''], '$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 & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''], '$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 & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''], '$notify7' => ['notify7', DI::l10n()->t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''],
'$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 & NOTIFY_POKE), NOTIFY_POKE, ''],

View File

@ -17,4 +17,6 @@ class Type
const COMMENT = 8; const COMMENT = 8;
/** @var int Notification about a private message */ /** @var int Notification about a private message */
const MAIL = 16; const MAIL = 16;
/** @var int Notification about a friend suggestion */
const SUGGEST = 32;
} }

View File

@ -25,6 +25,7 @@ use Friendica\Model\Event;
use Friendica\Model\GContact; use Friendica\Model\GContact;
use Friendica\Model\Item; use Friendica\Model\Item;
use Friendica\Model\Mail; use Friendica\Model\Mail;
use Friendica\Model\Notify\Type;
use Friendica\Model\PermissionSet; use Friendica\Model\PermissionSet;
use Friendica\Model\Profile; use Friendica\Model\Profile;
use Friendica\Model\User; use Friendica\Model\User;
@ -1892,7 +1893,7 @@ class DFRN
notification( notification(
[ [
'type' => NOTIFY_SUGGEST, 'type' => Type::SUGGEST,
'notify_flags' => $importer['notify-flags'], 'notify_flags' => $importer['notify-flags'],
'language' => $importer['language'], 'language' => $importer['language'],
'to_name' => $importer['username'], 'to_name' => $importer['username'],