updatePublicLinkShare.feature: Used sharingNG for sharing in given step

This commit is contained in:
Prarup Gurung
2024-05-20 09:26:55 +05:45
parent 438e28ff73
commit fec9de257f
3 changed files with 171 additions and 107 deletions
@@ -1810,9 +1810,8 @@ trait Sharing {
* @throws Exception
*/
public function userGetsInfoOfLastPublicLinkShareUsingTheSharingApi(string $user, ?string $language = null):void {
if ($this->getLastCreatedPublicShare()->id !== null) {
$shareId = (string) $this->getLastCreatedPublicShare()->id;
} else {
$shareId = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedLinkShareID() : $this->getLastCreatedPublicShare()->id;
if ($shareId === null) {
throw new Exception(
__METHOD__ . " last public link share data was not found"
);