Skip to content
Snippets Groups Projects
Unverified Commit 72f8a58f authored by Joas Schilling's avatar Joas Schilling
Browse files

Parse activity when a user self-unshares a file

parent 75c37370
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ class Users extends Base {
const SUBJECT_SHARED_WITH_BY = 'shared_with_by';
const SUBJECT_UNSHARED_BY = 'unshared_by';
const SUBJECT_SELF_UNSHARED = 'self_unshared';
const SUBJECT_SELF_UNSHARED_BY = 'self_unshared_by';
/**
* @param IEvent $event
......@@ -49,6 +51,10 @@ class Users extends Base {
$subject = $this->l->t('Shared with {user}');
} else if ($event->getSubject() === self::SUBJECT_UNSHARED_USER_SELF) {
$subject = $this->l->t('Removed share for {user}');
} else if ($event->getSubject() === self::SUBJECT_SELF_UNSHARED) {
$subject = $this->l->t('You removed yourself');
} else if ($event->getSubject() === self::SUBJECT_SELF_UNSHARED_BY) {
$subject = $this->l->t('{actor} removed themselves');
} else if ($event->getSubject() === self::SUBJECT_RESHARED_USER_BY) {
$subject = $this->l->t('{actor} shared with {user}');
} else if ($event->getSubject() === self::SUBJECT_UNSHARED_USER_BY) {
......@@ -85,6 +91,10 @@ class Users extends Base {
$subject = $this->l->t('You shared {file} with {user}');
} else if ($event->getSubject() === self::SUBJECT_UNSHARED_USER_SELF) {
$subject = $this->l->t('You removed {user} from {file}');
} else if ($event->getSubject() === self::SUBJECT_SELF_UNSHARED) {
$subject = $this->l->t('You removed yourself from {file}');
} else if ($event->getSubject() === self::SUBJECT_SELF_UNSHARED_BY) {
$subject = $this->l->t('{actor} removed themselves from {file}');
} else if ($event->getSubject() === self::SUBJECT_RESHARED_USER_BY) {
$subject = $this->l->t('{actor} shared {file} with {user}');
} else if ($event->getSubject() === self::SUBJECT_UNSHARED_USER_BY) {
......@@ -121,6 +131,8 @@ class Users extends Base {
];
case self::SUBJECT_SHARED_WITH_BY:
case self::SUBJECT_UNSHARED_BY:
case self::SUBJECT_SELF_UNSHARED:
case self::SUBJECT_SELF_UNSHARED_BY:
return [
'file' => $this->getFile($parameters[0], $event),
'actor' => $this->getUser($parameters[1]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment