|
|
@@ -59,13 +59,33 @@ class Notifier implements INotifier { |
|
|
|
$this->cloudIdManager = $cloudIdManager; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Identifier of the notifier, only use [a-z0-9_] |
|
|
|
* |
|
|
|
* @return string |
|
|
|
* @since 17.0.0 |
|
|
|
*/ |
|
|
|
public function getID(): string { |
|
|
|
return 'federatedfilesharing'; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Human readable name describing the notifier |
|
|
|
* |
|
|
|
* @return string |
|
|
|
* @since 17.0.0 |
|
|
|
*/ |
|
|
|
public function getName(): string { |
|
|
|
return $this->factory->get('federatedfilesharing')->t('Federated sharing'); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param INotification $notification |
|
|
|
* @param string $languageCode The code of the language that should be used to prepare the notification |
|
|
|
* @return INotification |
|
|
|
* @throws \InvalidArgumentException |
|
|
|
*/ |
|
|
|
public function prepare(INotification $notification, $languageCode) { |
|
|
|
public function prepare(INotification $notification, string $languageCode): INotification { |
|
|
|
if ($notification->getApp() !== 'files_sharing') { |
|
|
|
// Not my app => throw |
|
|
|
throw new \InvalidArgumentException(); |