aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-11-30 10:14:26 +0100
committerGitHub <noreply@github.com>2018-11-30 10:14:26 +0100
commitcae600d205572d38f6215e5e250f9bf5d89e64ff (patch)
tree0f6bfb73c256c656740060f8c68134a5b5964310
parente152e3051af90e48a06a656ab1596da4a6d5ee71 (diff)
parent72f8a58f89312f3fe2d740150491e7b0924a4122 (diff)
downloadnextcloud-server-cae600d205572d38f6215e5e250f9bf5d89e64ff.tar.gz
nextcloud-server-cae600d205572d38f6215e5e250f9bf5d89e64ff.zip
Merge pull request #12628 from nextcloud/bugfix/act-317/missing-activity-for-user-self-unshare
Parse activity when a user self-unshares a file
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Users.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Activity/Providers/Users.php b/apps/files_sharing/lib/Activity/Providers/Users.php
index 2de7e23621e..61f169fd092 100644
--- a/apps/files_sharing/lib/Activity/Providers/Users.php
+++ b/apps/files_sharing/lib/Activity/Providers/Users.php
@@ -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]),