Skip to content

Commit

Permalink
fix: Use timestamp instead of revision id in files_versions metadata API
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Jul 24, 2024
1 parent 55f81ea commit 6e76aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_versions/lib/Sabre/VersionFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function setMetadataValue(string $key, string $value): bool {
$backend = $this->version->getBackend();

if ($backend instanceof IMetadataVersionBackend) {
$backend->setMetadataValue($this->version->getSourceFile(), $this->version->getRevisionId(), $key, $value);
$backend->setMetadataValue($this->version->getSourceFile(), $this->version->getTimestamp(), $key, $value);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion Note

Argument 1 of OCA\Files_Versions\Versions\IMetadataVersionBackend::setMetadataValue expects OCP\Files\Node, but parent type OCP\Files\FileInfo provided
return true;
} elseif ($key === 'label' && $backend instanceof INameableVersionBackend) {
$backend->setVersionLabel($this->version, $value);
Expand Down

0 comments on commit 6e76aed

Please sign in to comment.