Desktop: Fixes #11923: Sharing a notebook with nobody prints "No user with ID public_key" (#11932)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
pull/11941/head^2
PARAMESH T S 2025-03-06 21:28:10 +05:30 committed by GitHub
parent d1d75449f5
commit bc27f47881
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -329,6 +329,7 @@ export default class ShareService {
let recipientMasterKey: MasterKeyEntity = null;
if (getEncryptionEnabled()) {
if (!recipientEmail) throw new Error(_('Please provide the recipient email'));
const syncInfo = localSyncInfo();
const masterKey = syncInfo.masterKeys.find(m => m.id === masterKeyId);
if (!masterKey) throw new Error(`Cannot find master key with ID "${masterKeyId}"`);