Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-07-15 10:04:35 +0300
committerJoas Schilling <coding@schilljs.com>2019-07-30 10:33:41 +0300
commite3e3e8e741f5bc94510b2002031e2777e64a42ba (patch)
treef1295b81f24eb558c966123a991bfae53120259d /lib/Notification
parenta1b17d282f5c9d886ad9320aa4178d16a153e9ea (diff)
Add a mention-alike notification for replies
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification')
-rw-r--r--lib/Notification/Notifier.php36
1 files changed, 21 insertions, 15 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php
index 3c11cecab..0b54a40af 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -165,7 +165,7 @@ class Notifier implements INotifier {
}
return $this->parseCall($notification, $room, $l);
}
- if ($subject === 'mention' || $subject === 'chat') {
+ if ($subject === 'reply' || $subject === 'mention' || $subject === 'chat') {
return $this->parseChatMessage($notification, $room, $participant, $l);
}
@@ -251,25 +251,31 @@ class Notifier implements INotifier {
if ($notification->getSubject() === 'chat') {
if ($room->getType() === Room::ONE_TO_ONE_CALL) {
$subject = $l->t('{user} sent you a private message');
+ } else if ($richSubjectUser) {
+ $subject = $l->t('{user} sent a message in conversation {call}');
+ } else if (!$isGuest) {
+ $subject = $l->t('A deleted user sent a message in conversation {call}');
} else {
- if ($richSubjectUser) {
- $subject = $l->t('{user} sent a message in conversation {call}');
- } else if (!$isGuest) {
- $subject = $l->t('A deleted user sent a message in conversation {call}');
- } else {
- $subject = $l->t('A guest sent a message in conversation {call}');
- }
+ $subject = $l->t('A guest sent a message in conversation {call}');
}
- } else if ($room->getType() === Room::ONE_TO_ONE_CALL) {
- $subject = $l->t('{user} mentioned you in a private conversation');
- } else {
- if ($richSubjectUser) {
- $subject = $l->t('{user} mentioned you in conversation {call}');
+ } else if ($notification->getSubject() === 'reply') {
+ if ($room->getType() === Room::ONE_TO_ONE_CALL) {
+ $subject = $l->t('{user} replied to your private message');
+ } else if ($richSubjectUser) {
+ $subject = $l->t('{user} replied to your message in conversation {call}');
} else if (!$isGuest) {
- $subject = $l->t('A deleted user mentioned you in conversation {call}');
+ $subject = $l->t('A deleted user replied to your message in conversation {call}');
} else {
- $subject = $l->t('A guest mentioned you in conversation {call}');
+ $subject = $l->t('A guest replied to your message in conversation {call}');
}
+ } else if ($room->getType() === Room::ONE_TO_ONE_CALL) {
+ $subject = $l->t('{user} mentioned you in a private conversation');
+ } else if ($richSubjectUser) {
+ $subject = $l->t('{user} mentioned you in conversation {call}');
+ } else if (!$isGuest) {
+ $subject = $l->t('A deleted user mentioned you in conversation {call}');
+ } else {
+ $subject = $l->t('A guest mentioned you in conversation {call}');
}
$notification = $this->addActionButton($notification, $l->t('View chat'), false);