summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-02-01 13:15:59 +0100
committerJoas Schilling <coding@schilljs.com>2019-02-01 13:15:59 +0100
commit09642da8cc248b4c88f50bdbbcaff28a357fd099 (patch)
tree2bb59576f9638205ad20984f6c3388e9d5be0d29 /settings
parente78f4cec1561034aa3f3e8de0eaa9f157d565801 (diff)
downloadnextcloud-server-09642da8cc248b4c88f50bdbbcaff28a357fd099.tar.gz
nextcloud-server-09642da8cc248b4c88f50bdbbcaff28a357fd099.zip
Use rich object subjects
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings')
-rw-r--r--settings/Activity/Provider.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/settings/Activity/Provider.php b/settings/Activity/Provider.php
index 68606b80739..4debf1210ce 100644
--- a/settings/Activity/Provider.php
+++ b/settings/Activity/Provider.php
@@ -111,11 +111,11 @@ class Provider implements IProvider {
$subject = $this->l->t('Your email address was changed by an administrator');
} else if ($event->getSubject() === self::APP_TOKEN_CREATED) {
- $subject = $this->l->t('You created app password "%1$s"', $event->getSubjectParameters());
+ $subject = $this->l->t('You created app password "{token}"');
} else if ($event->getSubject() === self::APP_TOKEN_UPDATED) {
- $subject = $this->l->t('You updated app password "%1$s"', $event->getSubjectParameters());
+ $subject = $this->l->t('You updated app password "{token}"');
} else if ($event->getSubject() === self::APP_TOKEN_DELETED) {
- $subject = $this->l->t('You deleted app password "%1$s"', $event->getSubjectParameters());
+ $subject = $this->l->t('You deleted app password "{token}"');
} else {
throw new \InvalidArgumentException();
@@ -141,15 +141,22 @@ class Provider implements IProvider {
case self::PASSWORD_RESET:
case self::EMAIL_CHANGED_SELF:
case self::EMAIL_CHANGED:
- case self::APP_TOKEN_CREATED:
- case self::APP_TOKEN_UPDATED:
- case self::APP_TOKEN_DELETED:
return [];
case self::PASSWORD_CHANGED_BY:
case self::EMAIL_CHANGED_BY:
return [
'actor' => $this->generateUserParameter($parameters[0]),
];
+ case self::APP_TOKEN_CREATED:
+ case self::APP_TOKEN_UPDATED:
+ case self::APP_TOKEN_DELETED:
+ return [
+ 'token' => [
+ 'type' => 'highlight',
+ 'id' => $event->getObjectId(),
+ 'name' => $parameters[0],
+ ]
+ ];
}
throw new \InvalidArgumentException();