aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2022-09-30 19:12:39 +0200
committerJulien Veyssier <eneiluj@posteo.net>2022-09-30 19:12:39 +0200
commiteff783797a5271a4097cce12639408b647c9151b (patch)
tree5403cf3aa2ff0daed950e56a0ac5250bc0f7eb25
parent910c774b35b25ac783023bebdb34feeb6d608240 (diff)
downloadnextcloud-server-eff783797a5271a4097cce12639408b647c9151b.tar.gz
nextcloud-server-eff783797a5271a4097cce12639408b647c9151b.zip
reference url can always fallback to the link itself
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
-rw-r--r--lib/public/Collaboration/Reference/IReference.php2
-rw-r--r--lib/public/Collaboration/Reference/Reference.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/public/Collaboration/Reference/IReference.php b/lib/public/Collaboration/Reference/IReference.php
index 0155ae86dd8..31608b52cc5 100644
--- a/lib/public/Collaboration/Reference/IReference.php
+++ b/lib/public/Collaboration/Reference/IReference.php
@@ -98,7 +98,7 @@ interface IReference extends JsonSerializable {
/**
* @since 25.0.0
*/
- public function getUrl(): ?string;
+ public function getUrl(): string;
/**
* Set the reference specific rich object representation
diff --git a/lib/public/Collaboration/Reference/Reference.php b/lib/public/Collaboration/Reference/Reference.php
index 07da3399a1e..6b92a0fae52 100644
--- a/lib/public/Collaboration/Reference/Reference.php
+++ b/lib/public/Collaboration/Reference/Reference.php
@@ -149,8 +149,8 @@ class Reference implements IReference {
* @inheritdoc
* @since 25.0.0
*/
- public function getUrl(): ?string {
- return $this->url;
+ public function getUrl(): string {
+ return $this->url ?? $this->reference;
}
/**