Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/BackgroundJob/RemoteActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected function translateType($internalType, $secondPath) {
case Files::TYPE_SHARE_CREATED:
case Files::TYPE_SHARE_RESTORED:
return 'Create';
case Files::TYPE_SHARE_CHANGED:
case Files::TYPE_FILE_CHANGED:
if ($secondPath !== '') {
return 'Move';
}
Expand Down
11 changes: 4 additions & 7 deletions lib/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,13 @@ public function receive(IEvent $event) {
$emailSetting = $this->userSettings->getUserSetting($event->getAffectedUser(), 'email', $event->getType());
$emailSetting = ($emailSetting) ? $this->userSettings->getUserSetting($event->getAffectedUser(), 'setting', 'batchtime') : false;

// User is not the author or wants to see their own actions
$createStream = !$selfAction || $this->userSettings->getUserSetting($event->getAffectedUser(), 'setting', 'self');

// Add activity to stream
if ($createStream) {
if (!$selfAction) {
$activityId = $this->data->send($event);
}

if (!$selfAction && $notificationSetting && $activityId) {
$this->notificationGenerator->sendNotificationForEvent($event, $activityId);
}
if (!$selfAction && $notificationSetting && $activityId) {
$this->notificationGenerator->sendNotificationForEvent($event, $activityId);
}

// User is not the author or wants to see their own actions
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/RemoteActivityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ protected function translateType($type) {
return Files::TYPE_SHARE_CREATED;
case 'Move':
case 'Update':
return Files::TYPE_SHARE_CHANGED;
return Files::TYPE_FILE_CHANGED;
case 'Delete':
return Files::TYPE_SHARE_DELETED;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Extension/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

class Files {
const TYPE_SHARE_CREATED = 'file_created';
const TYPE_SHARE_CHANGED = 'file_changed';
const TYPE_FILE_CHANGED = 'file_changed';
const TYPE_FAVORITE_CHANGED = 'file_favorite_changed';
const TYPE_SHARE_DELETED = 'file_deleted';
const TYPE_SHARE_RESTORED = 'file_restored';
}
Loading