fix(sharebymail): Fix activity rich object id type

Fixes "Object for placeholder file is invalid, value 21 for key id is not a string"
Exception spotted in tests logs.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/51458/head
Côme Chilliet 2025-03-18 15:47:29 +07:00 committed by Côme Chilliet
parent 140aba1f16
commit c9938e54a6
1 changed files with 3 additions and 3 deletions

@ -233,12 +233,12 @@ class Activity implements IProvider {
/**
* @param int $id
* @param string $path
* @return array
* @return array<string,string>
*/
protected function generateFileParameter($id, $path) {
protected function generateFileParameter($id, $path): array {
return [
'type' => 'file',
'id' => $id,
'id' => (string)$id,
'name' => basename($path),
'path' => trim($path, '/'),
'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]),