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>2018-07-09 18:31:50 +0300
committerJoas Schilling <coding@schilljs.com>2018-08-02 12:29:50 +0300
commitb74f91ba81e7d7078d5f5823035c70735983faa8 (patch)
tree103c4672e2600991acfc9bf32b000d4d1a287495 /lib/Notification
parent8005b579bfef5e8e2011363f008bd4012aa66245 (diff)
Always send notifications for one2one chats
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification')
-rw-r--r--lib/Notification/Notifier.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php
index b930233aa..927f643c0 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -97,7 +97,7 @@ class Notifier implements INotifier {
if ($subject === 'call') {
return $this->parseCall($notification, $room, $l);
}
- if ($subject === 'mention') {
+ if ($subject === 'mention' || $subject === 'chat') {
return $this->parseMention($notification, $room, $l);
}
@@ -157,7 +157,16 @@ class Notifier implements INotifier {
}
$notification->setParsedMessage($parsedMessage);
- if ($room->getType() === Room::ONE_TO_ONE_CALL) {
+ if ($notification->getSubject() === 'chat') {
+ $notification
+ ->setParsedSubject(str_replace('{user}', $user->getDisplayName(), $l->t('{user} sent you a private message')))
+ ->setRichSubject(
+ $l->t('{user} sent you a private message'), [
+ 'user' => $richSubjectUser
+ ]
+ );
+
+ } else if ($room->getType() === Room::ONE_TO_ONE_CALL) {
$notification
->setParsedSubject(
$l->t('%s mentioned you in a private conversation', [$user->getDisplayName()])