Skip to content

Commit

Permalink
fix: Share attributes format when caching
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge authored and backportbot[bot] committed Oct 31, 2024
1 parent 73c8d44 commit bab79d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Model/ShareWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ public function import(array $data): IDeserializable {
->setToken($this->get('token', $data))
->setShareTime($shareTime);

$this->importAttributesFromDatabase($this->get('attributes', $data));

try {
$this->setExpirationDate(new DateTime($this->get('expiration', $data)));
} catch (\Exception $e) {
Expand Down Expand Up @@ -610,7 +612,7 @@ public function jsonSerialize(): array {
'shareType' => $this->getShareType(),
'providerId' => $this->getProviderId(),
'permissions' => $this->getPermissions(),
'attributes' => $this->getAttributes(),
'attributes' => json_encode($this->getAttributes()->toArray()),
'hideDownload' => $this->getHideDownload(),
'itemType' => $this->getItemType(),
'itemSource' => $this->getItemSource(),
Expand Down

0 comments on commit bab79d3

Please sign in to comment.