π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
feat: reduce data sent to cast device
httpjamesmbf69051440e6
diff --git a/apps/photos/src/components/Collections/CollectionOptions/AlbumCastDialog.tsx b/apps/photos/src/components/Collections/CollectionOptions/AlbumCastDialog.tsxindex 9c31938492..fcd71c8868 100644--- a/apps/photos/src/components/Collections/CollectionOptions/AlbumCastDialog.tsx+++ b/apps/photos/src/components/Collections/CollectionOptions/AlbumCastDialog.tsx@@ -5,7 +5,7 @@ import SingleInputForm, {} from '@ente/shared/components/SingleInputForm';import { t } from 'i18next';import { getKexValue, setKexValue } from '@ente/shared/network/kexService';-import { SESSION_KEYS, getKey } from '@ente/shared/storage/sessionStorage';+// import { SESSION_KEYS, getKey } from '@ente/shared/storage/sessionStorage';import { boxSeal, toB64 } from '@ente/shared/crypto/internal/libsodium';import { loadSender } from '@ente/shared/hooks/useCastSender';import { useEffect, useState } from 'react';@@ -13,11 +13,13 @@ import EnteButton from '@ente/shared/components/EnteButton';import EnteSpinner from '@ente/shared/components/EnteSpinner';import { VerticallyCentered } from '@ente/shared/components/Container';import { logError } from '@ente/shared/sentry';+import { LS_KEYS, getData } from '@ente/shared/storage/localStorage';+import { Collection } from 'types/collection';interface Props {show: boolean;onHide: () => void;- currentCollectionId: number;+ currentCollection: Collection;}enum AlbumCastError {@@ -71,9 +73,9 @@ export default function AlbumCastDialog(props: Props) {// ok, they exist. let's give them the good stuff.const payload = JSON.stringify({- ...window.localStorage,- sessionKey: getKey(SESSION_KEYS.ENCRYPTION_KEY),- targetCollectionId: props.currentCollectionId,+ user: getData(LS_KEYS.USER),+ targetCollectionId: props.currentCollection.id,+ targetCollectionKey: props.currentCollection.key,});const encryptedPayload = await boxSeal(diff --git a/apps/photos/src/components/Collections/index.tsx b/apps/photos/src/components/Collections/index.tsxindex a1b1ddef99..a6b408b741 100644--- a/apps/photos/src/components/Collections/index.tsx+++ b/apps/photos/src/components/Collections/index.tsx@@ -204,7 +204,7 @@ export default function Collections(props: Iprops) {setAttributesList={setCollectionDownloadProgressAttributesList}/><AlbumCastDialog- currentCollectionId={props.activeCollection?.id}+ currentCollection={props.activeCollection}show={showAlbumCastDialog}onHide={() => setShowAlbumCastDialog(false)}/>