From: Joshua Rüsweg Date: Thu, 19 Jul 2018 21:33:47 +0000 (+0200) Subject: Add reaction notification support for profile comments X-Git-Tag: 5.2.0_Alpha_1~364^2~101^2~73 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1575dcba16a572554d1ddb31b6012ffce726f490;p=GitHub%2FWoltLab%2FWCF.git Add reaction notification support for profile comments See #2508 --- diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 20a83cd7c8..35308e9c24 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -253,6 +253,7 @@ com.woltlab.wcf.notification.objectType wcf\system\user\notification\object\type\LikeUserNotificationObjectType com.woltlab.wcf.user + 1 com.woltlab.wcf.user.profileComment.response.like.notification diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php index 1e0016ed07..420f08f1d6 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php @@ -20,6 +20,7 @@ use wcf\system\WCF; */ class UserProfileCommentLikeUserNotificationEvent extends AbstractSharedUserNotificationEvent implements ITestableUserNotificationEvent { use TTestableCommentLikeUserNotificationEvent; + use TReactionUserNotificationEvent; /** * @inheritDoc @@ -66,14 +67,17 @@ class UserProfileCommentLikeUserNotificationEvent extends AbstractSharedUserNoti 'commentID' => $this->getCommentID(), 'count' => $count, 'others' => $count - 1, - 'owner' => $owner + 'owner' => $owner, + 'reactions' => $this->getReactionsForAuthors() ]); } return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.like.message', [ 'author' => $this->author, 'commentID' => $this->getCommentID(), - 'owner' => $owner + 'owner' => $owner, + 'userNotificationObject' => $this->getUserNotificationObject(), + 'reactions' => $this->getReactionsForAuthors() ]); } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 0747d04ef7..951584a9b4 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -4108,10 +4108,10 @@ Benachrichtigungen auf {PAGE_TITLE|language getAnchorTag()}{if $count != 1}{if $count == 2 && !$guestTimesTriggered} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3}{if !$guestTimesTriggered} und {else}, {/if} {@$authors[2]->getAnchorTag()}{/if}{/if}{if $guestTimesTriggered} und {if $guestTimesTriggered == 1}ein Gast{else}Gäste{/if}{/if}{else}{@$authors[0]->getAnchorTag()}{if $guestTimesTriggered},{else} und{/if} {#$others} weitere Benutzer {if $guestTimesTriggered}und {if $guestTimesTriggered == 1}ein Gast{else}Gäste{/if}{/if}{/if} haben Kommentare an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand verfasst.]]> getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand [URL:{link controller='User' object=$notificationContent[variables][owner] isEmail=true}#wall/comment{@$commentID}{/link}] verfasst{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]> {@$authorList} {if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand verfasst:

]]>
- - - getAnchorTag()} gefällt {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} Kommentar an {if $owner === null}{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand{else}der Pinnwand von {$owner->username}{/if}.]]> - getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weiteren{/if} gefällt {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} Kommentar an {if $owner === null}{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand{else}der Pinnwand von {$owner->username}{/if}.]]> + + + getAnchorTag()} hat auf {if LANGUAGE_USE_INFORMAL_VARIANT}deinen{else}Ihren{/if} Kommentar an {if $owner === null}{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand{else}der Pinnwand von {$owner->username}{/if} reagiert ({implode from=$reactions key=reactionID item=count}{#$count}× {@$__wcf->getReactionHandler()->getReactionTypeByID($reactionID)->renderIcon()}{/implode}).]]> + getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weitere{/if} haben auf {if LANGUAGE_USE_INFORMAL_VARIANT}deinen{else}Ihren{/if} Kommentar an {if $owner === null}{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand{else}der Pinnwand von {$owner->username}{/if} reagiert ({implode from=$reactions key=reactionID item=count}{#$count}× {@$__wcf->getReactionHandler()->getReactionTypeByID($reactionID)->renderIcon()}{/implode}).]]> userID}Ein Gast{else}{@$author->getAnchorTag()}{/if} hat eine Antwort zu {if LANGUAGE_USE_INFORMAL_VARIANT}deinem{else}Ihrem{/if} Kommentar an {if $owner->userID == $__wcf->getUser()->userID}{if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand{else}der Pinnwand von {$owner->username}{/if} verfasst.]]> @@ -4131,8 +4131,8 @@ Benachrichtigungen auf {PAGE_TITLE|language - - + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index bf5daec9ab..c014477d68 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -4096,10 +4096,10 @@ your notifications on {PAGE_TITLE|language} getAnchorTag()}{if $count != 1}{if $count == 2 && !$guestTimesTriggered} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3}{if !$guestTimesTriggered} and {else}, {/if} {@$authors[2]->getAnchorTag()}{/if}{/if}{if $guestTimesTriggered} and {if $guestTimesTriggered == 1}a guest{else}guests{/if}{/if}{else}{@$authors[0]->getAnchorTag()}{if $guestTimesTriggered},{else} and{/if} {#$others} other users {if $guestTimesTriggered}and {if $guestTimesTriggered == 1}a guest{else}guests{/if}{/if}{/if} wrote comments on your wall.]]> {@$authorList} wrote {if $count == 1 && !$guestTimesTriggered}a comment{else}comments{/if} your wall:

]]>
- - - getAnchorTag()} likes your comment on {if $owner === null}your wall{else}{$owner->username}’s wall{/if}.]]> - getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$others} others{/if} like your comment on {if $owner === null}your wall{else}{$owner->username}’s wall{/if}.]]> + + + getAnchorTag()} reacted to your comment on {if $owner === null}your wall{else}{$owner->username}’s wall{/if} ({implode from=$reactions key=reactionID item=count}{#$count}× {@$__wcf->getReactionHandler()->getReactionTypeByID($reactionID)->renderIcon()}{/implode}).]]> + getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$others} others{/if} reacted to your comment on {if $owner === null}your wall{else}{$owner->username}’s wall{/if} ({implode from=$reactions key=reactionID item=count}{#$count}× {@$__wcf->getReactionHandler()->getReactionTypeByID($reactionID)->renderIcon()}{/implode}).]]> userID}A guest{else}{@$author->getAnchorTag()}{/if} wrote a reply to your comment on {if $owner->userID == $__wcf->getUser()->userID}your{else}{$owner->username}’s{/if} wall.]]> @@ -4119,8 +4119,8 @@ your notifications on {PAGE_TITLE|language} - - + +