* Email notification options
* @{
*/
-define('NOTIFY_TAGSELF', 128);
define('NOTIFY_TAGSHARE', 256);
define('NOTIFY_POKE', 512);
define('NOTIFY_SHARE', 1024);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'/message/'.$params['item']['id'].'">'.$sitename.'</a>');
}
- if ($params['type'] == Notify\Type::COMMENT || $params['type'] == NOTIFY_TAGSELF) {
+ if ($params['type'] == Notify\Type::COMMENT || $params['type'] == Notify\Type::TAG_SELF) {
$thread = Item::selectFirstThreadForUser($params['uid'], ['ignored'], ['iid' => $parent_id, 'deleted' => false]);
if (DBA::isResult($thread) && $thread['ignored']) {
Logger::log('Thread ' . $parent_id . ' will be ignored', Logger::DEBUG);
// Check to see if there was already a tag notify or comment notify for this post.
// If so don't create a second notification
/// @todo In the future we should store the notification with the highest "value" and replace notifications
- $condition = ['type' => [NOTIFY_TAGSELF, Notify\Type::COMMENT, NOTIFY_SHARE],
+ $condition = ['type' => [Notify\Type::TAG_SELF, Notify\Type::COMMENT, NOTIFY_SHARE],
'link' => $params['link'], 'uid' => $params['uid']];
if (DBA::exists('notify', $condition)) {
return false;
$params['type'] = NOTIFY_SHARE;
$params['verb'] = Activity::POST;
} elseif ($notification_type & UserItem::NOTIF_EXPLICIT_TAGGED) {
- $params['type'] = NOTIFY_TAGSELF;
+ $params['type'] = Notify\Type::TAG_SELF;
$params['verb'] = Activity::TAG;
} elseif ($notification_type & UserItem::NOTIF_IMPLICIT_TAGGED) {
$params['type'] = Notify\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, ''],
'$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 & Type::TAG_SELF), Type::TAG_SELF, ''],
'$notify8' => ['notify8', DI::l10n()->t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''],
'$desktop_notifications' => ['desktop_notifications', DI::l10n()->t('Activate desktop notifications') , false, DI::l10n()->t('Show desktop popup on new notifications')],
const MAIL = 16;
/** @var int Notification about a friend suggestion */
const SUGGEST = 32;
+ /** @var int Unknown Notification
+ * @deprecated
+ */
+ const PROFILE = 64;
+ /** @var int Notification about being tagged in a post */
+ const TAG_SELF = 128;
}