mirror of https://github.com/nextcloud/server
Merge pull request #34353 from nextcloud/fix/noid/reference-url-fallback
Reference url can always fallback to the link itself
This commit is contained in:
commit
4844ca619c
|
@ -98,7 +98,7 @@ interface IReference extends JsonSerializable {
|
||||||
/**
|
/**
|
||||||
* @since 25.0.0
|
* @since 25.0.0
|
||||||
*/
|
*/
|
||||||
public function getUrl(): ?string;
|
public function getUrl(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the reference specific rich object representation
|
* Set the reference specific rich object representation
|
||||||
|
|
|
@ -149,8 +149,8 @@ class Reference implements IReference {
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
* @since 25.0.0
|
* @since 25.0.0
|
||||||
*/
|
*/
|
||||||
public function getUrl(): ?string {
|
public function getUrl(): string {
|
||||||
return $this->url;
|
return $this->url ?? $this->reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue