diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-08-28 18:40:50 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-08-28 18:40:50 +0200 |
commit | 42f0651b8324be31d1ff31dad82194f81d748900 (patch) | |
tree | 5309af4816aa4223fb639c8773741cd46c173f93 /lib/private/activitymanager.php | |
parent | efeef958a3e707c06f25dc6e473d1b49edf88b07 (diff) | |
download | nextcloud-server-42f0651b8324be31d1ff31dad82194f81d748900.tar.gz nextcloud-server-42f0651b8324be31d1ff31dad82194f81d748900.zip |
Sticky the notification types of files and sharing
Diffstat (limited to 'lib/private/activitymanager.php')
-rw-r--r-- | lib/private/activitymanager.php | 14 |
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); } /** |