summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-08-31 17:56:48 +0200
committerVincent Petry <pvince81@owncloud.com>2015-08-31 17:56:48 +0200
commit85b62c7d82695dd4cd1c73e7c1d81269ec17170b (patch)
treef76626187dc9eba02cd2b267e94518ae740932b1 /lib
parente367f1bfc109cbb5095894279d1b6b7c15a9f428 (diff)
parent42f0651b8324be31d1ff31dad82194f81d748900 (diff)
downloadnextcloud-server-85b62c7d82695dd4cd1c73e7c1d81269ec17170b.tar.gz
nextcloud-server-85b62c7d82695dd4cd1c73e7c1d81269ec17170b.zip
Merge pull request #18635 from owncloud/stickify-files-and-sharing-notification-types
Sticky the notification types of files and sharing
Diffstat (limited to 'lib')
-rw-r--r--lib/private/activitymanager.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php
index a973db7206f..fc250173536 100644
--- a/lib/private/activitymanager.php
+++ b/lib/private/activitymanager.php
@@ -244,15 +244,27 @@ class ActivityManager implements IManager {
* @return array
*/
public function getNotificationTypes($languageCode) {
+ $filesNotificationTypes = [];
+ $sharingNotificationTypes = [];
+
$notificationTypes = array();
foreach ($this->getExtensions() as $c) {
$result = $c->getNotificationTypes($languageCode);
if (is_array($result)) {
+ if (class_exists('\OCA\Files\Activity') && $c instanceof \OCA\Files\Activity) {
+ $filesNotificationTypes = $result;
+ continue;
+ }
+ if (class_exists('\OCA\Files_Sharing\Activity') && $c instanceof \OCA\Files_Sharing\Activity) {
+ $sharingNotificationTypes = $result;
+ continue;
+ }
+
$notificationTypes = array_merge($notificationTypes, $result);
}
}
- return $notificationTypes;
+ return array_merge($filesNotificationTypes, $sharingNotificationTypes, $notificationTypes);
}
/**