Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -723,6 +723,7 @@ class Notification
|
||||
|
||||
$unsubscribeBlurb = NULL;
|
||||
$unfollowLink = NULL;
|
||||
$listUnsubscribeLink = null;
|
||||
$okToEmail = TRUE;
|
||||
|
||||
if ( $info )
|
||||
@@ -760,6 +761,7 @@ class Notification
|
||||
|
||||
$guestKey = md5( $info['follow_app'] . ';' . $info['follow_area'] . ';' . $info['follow_rel_id'] . ';' . $info['follow_member_id'] . ';' . $info['follow_added'] ) . '-' . md5( $member->email . ';' . $member->ip_address . ';' . $member->joined->getTimestamp() );
|
||||
$unfollowLink = Url::internal( "app=core&module=system&controller=notifications&do=unfollowFromEmail&follow_app={$info['follow_app']}&follow_area={$info['follow_area']}&follow_id={$info['follow_rel_id']}&gkey={$guestKey}", 'front' );
|
||||
$listUnsubscribeLink = $unfollowLink->setQueryString( 'listunsubscribe', 1 );
|
||||
|
||||
/* If we are tracking email views/clicks, add the tracking info to this URL as the email handler won't be able to */
|
||||
if( Settings::i()->prune_log_emailstats != 0 )
|
||||
@@ -778,9 +780,10 @@ class Notification
|
||||
if ( $okToEmail )
|
||||
{
|
||||
$emailRecipients[ $language ][ $member->email ] = array(
|
||||
'member_name' => $member->name,
|
||||
'unsubscribe_blurb' => $unsubscribeBlurb,
|
||||
'unfollow_link' => $unfollowLink
|
||||
'member_name' => $member->name,
|
||||
'unsubscribe_blurb' => $unsubscribeBlurb,
|
||||
'unfollow_link' => $unfollowLink,
|
||||
'list_unsubscribe_link' => $listUnsubscribeLink
|
||||
);
|
||||
}
|
||||
|
||||
@@ -921,7 +924,10 @@ class Notification
|
||||
{
|
||||
$pushRecipients[ $member->member_id ] = $pushNotifications[ $language->id ];
|
||||
$pushRecipients[ $member->member_id ]['member'] = $member->member_id;
|
||||
$pushRecipients[ $member->member_id ]['unreadCount'] = $member->notification_cnt;
|
||||
|
||||
/* Count Unread PMs */
|
||||
$unreadMessagesCount = Db::i()->select( 'COUNT(*)', 'core_message_topic_user_map', [ 'map_has_unread=1 and map_user_id=?', $member->member_id ] )->first();
|
||||
$pushRecipients[ $member->member_id ]['unreadCount'] = $member->notification_cnt + $unreadMessagesCount;
|
||||
$pushRecipients[ $member->member_id ]['notificationId'] = $notification?->id;
|
||||
}
|
||||
|
||||
@@ -976,7 +982,10 @@ class Notification
|
||||
{
|
||||
if ( !empty( $emailRecipients[ $languageId ] ) )
|
||||
{
|
||||
$email->mergeAndSend( $emailRecipients[ $languageId ], NULL, NULL, array(), Lang::load( $languageId ) );
|
||||
$email->mergeAndSend( $emailRecipients[ $languageId ], NULL, NULL, array(
|
||||
'List-Unsubscribe' => '<*|list_unsubscribe_link|*>',
|
||||
'List-Unsubscribe-Post' => 'List-Unsubscribe=One-Click'
|
||||
), Lang::load( $languageId ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1024,7 +1033,7 @@ class Notification
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
if ( $count == 1 )
|
||||
if ( \IPS\IN_DEV or $count == 1 )
|
||||
{
|
||||
static::sendPWANotifications( $pwaPushNotifications );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user