Reference the message-id of parent comment's email notification for responses
authorTim Düsterhus <duesterhus@woltlab.com>
Sat, 18 Jun 2016 13:55:34 +0000 (15:55 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 29 Jul 2016 14:25:53 +0000 (16:25 +0200)
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php

index c70a97be2d326a5937cc75ae043eecd64728d86c..cdf4ab22455ad94a154ecf968ef0511b6c9c530f 100644 (file)
@@ -5,6 +5,7 @@ use wcf\data\user\User;
 use wcf\data\user\UserProfile;
 use wcf\system\cache\runtime\CommentRuntimeCache;
 use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\email\Email;
 use wcf\system\request\LinkHandler;
 use wcf\system\user\notification\object\CommentResponseUserNotificationObject;
 use wcf\system\WCF;
@@ -97,9 +98,13 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractShare
                        ]);
                }
                
+               $messageID = '<com.woltlab.wcf.user.profileComment.notification/'.$comment->commentID.'@'.Email::getHost().'>';
+               
                return [
                        'template' => 'email_notification_userProfileCommentResponseOwner',
                        'application' => 'wcf',
+                       'in-reply-to' => [$messageID],
+                       'references' => [$messageID],
                        'variables' => [
                                'commentAuthor' => $commentAuthor,
                                'owner' => $owner
index d2ade897b2603df57cac593966a5453627b78a7d..ac7ea1e4b60dd4fc8a12a9d50d8202cff98c0da7 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace wcf\system\user\notification\event;
 use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\email\Email;
 
 /**
  * User notification event for profile comment responses.
@@ -72,9 +73,13 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser
        public function getEmailMessage($notificationType = 'instant') {
                $owner = UserProfileRuntimeCache::getInstance()->getObject($this->additionalData['objectID']);
                
+               $messageID = '<com.woltlab.wcf.user.profileComment.notification/'.$comment->commentID.'@'.Email::getHost().'>';
+               
                return [
                        'template' => 'email_notification_userProfileCommentResponse',
                        'application' => 'wcf',
+                       'in-reply-to' => [$messageID],
+                       'references' => [$messageID],
                        'variables' => [
                                'owner' => $owner
                        ]