Merge pull request #18635 from owncloud/stickify-files-and-sharing-notification-types
Sticky the notification types of files and sharing
This commit is contained in:
commit
85b62c7d82
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue