refactor: swap device-id contexts for user-id contexts at call sites
Renames DecryptParams.ownDeviceId to ownUserId so decryptMessages actually looks up bundles by user. Sweeps remaining OwnDeviceCtx and loadDevicePrivateKey consumers in the desktop app to use cachedUserKey from userIdentity. Files scheduled for deletion in later tasks (BackupExportDialog, DeviceRestore, BackupRestoreDialog, BackupPromptBanner, deviceBackup, DeviceRegistration) are left untouched.
This commit is contained in:
1 parent
8d69329763
commit
b89a7e2617
7 files changed
+57
-65
No files matched your search
@@ -440,7 +440,7 @@ export async function removeReaction(
|
||||
export interface DecryptParams {
|
||||
client: AppSupabaseClient;
|
||||
messages: MessageWithCipher[];
|
||||
ownDeviceId: string;
|
||||
ownUserId: string;
|
||||
ownPrivateKey: Uint8Array;
|
||||
/**
|
||||
* Optional delegate that performs the symmetric-decrypt + utf-8 decode
|
||||
@@ -483,7 +483,7 @@ export async function decryptMessages(opts: DecryptParams): Promise<DecryptedMes
|
||||
const handle = await tryGetConvKey(
|
||||
opts.client,
|
||||
m.conversationId,
|
||||
opts.ownDeviceId,
|
||||
opts.ownUserId,
|
||||
opts.ownPrivateKey,
|
||||
m.keyVersion,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user