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

github.com/nextcloud/nextcloud_announcements.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-12-09 16:38:55 +0300
committerGitHub <noreply@github.com>2016-12-09 16:38:55 +0300
commit7ee5349b924af1807d1722747f3c9616bc277564 (patch)
tree85057bc94e35f0b041598cbad2c40ec205b22eaa
parentbcceed12e3285ea21fec40987cc57fcfd864b226 (diff)
parentc55245dc7b29ee76dca70a564a03c641e739081c (diff)
Merge pull request #15 from nextcloud/fix-notification-renderingv11.0RC2
Fix the rendering of the notification
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/Notification/Notifier.php14
2 files changed, 3 insertions, 13 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 9b73f88..1725068 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -17,7 +17,7 @@
<repository type="git">https://github.com/nextcloud/nextcloud_announcements.git</repository>
<dependencies>
- <nextcloud min-version="10" max-version="11" />
+ <nextcloud min-version="11" max-version="11" />
</dependencies>
<types>
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php
index cc99710..4391836 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -71,19 +71,9 @@ class Notifier implements INotifier {
switch ($notification->getSubject()) {
case self::SUBJECT:
$parameters = $notification->getSubjectParameters();
-
- // Remove the user id from the author: "Nextcloud (Nextcloud)"
- $openingBracket = strpos($parameters[0], '(', 1);
- if ($openingBracket !== false) {
- $parameters[0] = trim(substr($parameters[0], 0, $openingBracket));
- }
-
$notification->setParsedSubject($l->t('Nextcloud announcement'))
- ->setParsedMessage($parameters[1]);
-
- if (method_exists($notification, 'setIcon')) {
- $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath($this->appName, 'app-dark.svg')));
- }
+ ->setParsedMessage($parameters[0])
+ ->setIcon($this->url->getAbsoluteURL($this->url->imagePath($this->appName, 'app-dark.svg')));
return $notification;