Move Notify::TYPE_CONFIRM
This commit is contained in:
parent
cfd50f9abb
commit
6e45514e2c
5 changed files with 8 additions and 6 deletions
1
boot.php
1
boot.php
|
@ -140,7 +140,6 @@ define('MAX_LIKERS', 75);
|
|||
* Email notification options
|
||||
* @{
|
||||
*/
|
||||
define('NOTIFY_CONFIRM', 2);
|
||||
define('NOTIFY_WALL', 4);
|
||||
define('NOTIFY_COMMENT', 8);
|
||||
define('NOTIFY_MAIL', 16);
|
||||
|
|
|
@ -339,7 +339,7 @@ function notification($params)
|
|||
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
|
||||
}
|
||||
|
||||
if ($params['type'] == NOTIFY_CONFIRM) {
|
||||
if ($params['type'] == Notify\Type::CONFIRM) {
|
||||
if ($params['verb'] == Activity::FRIEND) { // mutual connection
|
||||
$itemlink = $params['link'];
|
||||
$subject = $l10n->t('[Friendica:Notify] Connection accepted');
|
||||
|
|
|
@ -26,6 +26,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Notify\Type;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Util\Crypto;
|
||||
|
@ -525,10 +526,10 @@ function dfrn_confirm_post(App $a, $handsfree = null)
|
|||
if (DBA::isResult($r)) {
|
||||
$combined = $r[0];
|
||||
|
||||
if ($combined['notify-flags'] & NOTIFY_CONFIRM) {
|
||||
if ($combined['notify-flags'] & Type::CONFIRM) {
|
||||
$mutual = ($new_relation == Contact::FRIEND);
|
||||
notification([
|
||||
'type' => NOTIFY_CONFIRM,
|
||||
'type' => Type::CONFIRM,
|
||||
'notify_flags' => $combined['notify-flags'],
|
||||
'language' => $combined['language'],
|
||||
'to_name' => $combined['username'],
|
||||
|
|
|
@ -1230,8 +1230,8 @@ function settings_content(App $a)
|
|||
|
||||
'$h_not' => DI::l10n()->t('Notification Settings'),
|
||||
'$lbl_not' => DI::l10n()->t('Send a notification email when:'),
|
||||
'$notify1' => ['notify1', DI::l10n()->t('You receive an introduction'), ($notify & Type::INTRO), NOTIFY_INTRO, ''],
|
||||
'$notify2' => ['notify2', DI::l10n()->t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''],
|
||||
'$notify1' => ['notify1', DI::l10n()->t('You receive an introduction'), ($notify & Type::INTRO), Type::INTRO, ''],
|
||||
'$notify2' => ['notify2', DI::l10n()->t('Your introductions are confirmed'), ($notify & Type::CONFIRM), NOTIFY_CONFIRM, ''],
|
||||
'$notify3' => ['notify3', DI::l10n()->t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''],
|
||||
'$notify4' => ['notify4', DI::l10n()->t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''],
|
||||
'$notify5' => ['notify5', DI::l10n()->t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''],
|
||||
|
|
|
@ -9,4 +9,6 @@ class Type
|
|||
{
|
||||
/** @var int Introduction notifications */
|
||||
const INTRO = 1;
|
||||
/** @var int Notification about a confirmed introduction */
|
||||
const CONFIRM = 2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue