Skip to content

Commit

Permalink
Make the notification clickable again
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and danxuliu committed Nov 8, 2018
1 parent 86f25fb commit ad22021
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,16 +465,10 @@ protected function parsePasswordRequest(INotification $notification, Room $room,
}

try {
$segments = explode('/', $share->getNode()->getPath(), 4);
if (!isset($segments[3])) {
throw new \OCP\Files\NotFoundException('File not in /user/files/');
}
$file = [
'type' => 'file',
'type' => 'unlinked-file',
'id' => $share->getNodeId(),
'name' => $share->getNode()->getName(),
'path' => $segments[3],
'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $share->getNodeId()]),
];
} catch (\OCP\Files\NotFoundException $e) {
throw new \InvalidArgumentException('Unknown file');
Expand Down

0 comments on commit ad22021

Please sign in to comment.