diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2022-09-30 20:12:39 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-10-01 01:47:07 +0300 |
commit | 56abd79050c2572b2f448a09d1b15c2a37b5eb55 (patch) | |
tree | 4e6c8d4cd1471bd875a97788be971c40382d26f8 | |
parent | 5660589ca92bc800c046eff3057e0e675d49819b (diff) |
reference url can always fallback to the link itselfbackport/34353/stable25
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; } /** |