fix(#1654): Fix the calendar sharing bug

- The url was not initialised with the correct value for calendars.
This commit is contained in:
Fabrice Mouhartem 2024-09-16 17:09:59 +02:00
parent 970da3a91f
commit 76020f8af5
No known key found for this signature in database
GPG Key ID: 90579C24FD123C93

View File

@ -48,7 +48,8 @@ define([
data.password = priv.password;
// Access modal and the pad is not stored: get the hashes from outer
var hashes = priv.hashes || {};
data.href = Hash.hashToHref(hashes.editHash || hashes.fileHash, priv.app);
// For calendars, individual href is passed via opts
data.href = ((priv.app === 'calendar') && opts.href) || Hash.hashToHref(hashes.editHash || hashes.fileHash, priv.app);
if (hashes.viewHash) {
data.roHref = Hash.hashToHref(hashes.viewHash, priv.app);
}