Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/Chat/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function notifyReacted(Room $chat, IComment $comment, IComment $reaction)
if ($notificationLevel === Participant::NOTIFY_ALWAYS) {
$notification = $this->createNotification($chat, $comment, 'reaction', [
'reaction' => $reaction->getMessage(),
]);
], $reaction);
$notification->setUser($comment->getActorId());
$this->notificationManager->notify($notification);
}
Expand Down Expand Up @@ -388,9 +388,9 @@ private function getMentionedUsers(IComment $comment): array {
* @param array $subjectData
* @return INotification
*/
private function createNotification(Room $chat, IComment $comment, string $subject, array $subjectData = []): INotification {
$subjectData['userType'] = $comment->getActorType();
$subjectData['userId'] = $comment->getActorId();
private function createNotification(Room $chat, IComment $comment, string $subject, array $subjectData = [], ?IComment $reaction = null): INotification {
$subjectData['userType'] = $reaction ? $reaction->getActorType() : $comment->getActorType();
$subjectData['userId'] = $reaction ? $reaction->getActorId() : $comment->getActorId();

$notification = $this->notificationManager->createNotification();
$notification
Expand All @@ -400,7 +400,7 @@ private function createNotification(Room $chat, IComment $comment, string $subje
->setMessage($comment->getVerb(), [
'commentId' => $comment->getId(),
])
->setDateTime($comment->getCreationDateTime());
->setDateTime($reaction ? $reaction->getCreationDateTime() : $comment->getCreationDateTime());

return $notification;
}
Expand Down