* Email notification options
* @{
*/
-define('NOTIFY_CONFIRM', 2);
define('NOTIFY_WALL', 4);
define('NOTIFY_COMMENT', 8);
define('NOTIFY_MAIL', 16);
$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');
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;
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'],
'$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, ''],
{
/** @var int Introduction notifications */
const INTRO = 1;
+ /** @var int Notification about a confirmed introduction */
+ const CONFIRM = 2;
}