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:
@@ -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