diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2022-09-30 19:12:39 +0200 |
---|---|---|
committer | Julien Veyssier <eneiluj@posteo.net> | 2022-09-30 19:12:39 +0200 |
commit | eff783797a5271a4097cce12639408b647c9151b (patch) | |
tree | 5403cf3aa2ff0daed950e56a0ac5250bc0f7eb25 | |
parent | 910c774b35b25ac783023bebdb34feeb6d608240 (diff) | |
download | nextcloud-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.php | 2 | ||||
-rw-r--r-- | lib/public/Collaboration/Reference/Reference.php | 4 |
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; } /** |