summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-11-02 14:54:46 +0100
committerGitHub <noreply@github.com>2018-11-02 14:54:46 +0100
commit30a1237f8115683fc375395d842f3f4fc555b1e0 (patch)
tree5ed2518c0d581fa565b6f286bc2350a69e614891 /lib
parent337cd251872371f064968cdd8731929124ac4fb3 (diff)
parentf57b07e2c2c6a2ff7cc027eeeeab6ab8da123ad5 (diff)
downloadnextcloud-server-30a1237f8115683fc375395d842f3f4fc555b1e0.tar.gz
nextcloud-server-30a1237f8115683fc375395d842f3f4fc555b1e0.zip
Merge pull request #11875 from nextcloud/add-support-for-sending-the-password-for-a-link-share-by-nextcloud-talk
Add support for sending the password for a link share by Nextcloud Talk
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 50111054546..589b64fc58a 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -156,6 +156,8 @@ class DefaultShareProvider implements IShareProvider {
$qb->setValue('password', $qb->createNamedParameter($share->getPassword()));
}
+ $qb->setValue('password_by_talk', $qb->createNamedParameter($share->getSendPasswordByTalk(), IQueryBuilder::PARAM_BOOL));
+
//If an expiration date is set store it
if ($share->getExpirationDate() !== null) {
$qb->setValue('expiration', $qb->createNamedParameter($share->getExpirationDate(), 'datetime'));
@@ -293,6 +295,7 @@ class DefaultShareProvider implements IShareProvider {
$qb->update('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId())))
->set('password', $qb->createNamedParameter($share->getPassword()))
+ ->set('password_by_talk', $qb->createNamedParameter($share->getSendPasswordByTalk(), IQueryBuilder::PARAM_BOOL))
->set('uid_owner', $qb->createNamedParameter($share->getShareOwner()))
->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy()))
->set('permissions', $qb->createNamedParameter($share->getPermissions()))
@@ -938,6 +941,7 @@ class DefaultShareProvider implements IShareProvider {
$share->setSharedWith($data['share_with']);
} else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) {
$share->setPassword($data['password']);
+ $share->setSendPasswordByTalk((bool)$data['password_by_talk']);
$share->setToken($data['token']);
}