@droponair/sdk-js 0.34.1 → 0.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.34.2
4
+
5
+ ### Fixed
6
+
7
+ - **`retentionSeconds` and `deleteWhenEveryoneHasIt` were ignored by
8
+ `prepareAttachmentAndUpload`.** They reached the upload session only when it was
9
+ called directly; the everyday path dropped them, so a file lived for the app's
10
+ full retention and was never deleted early. Both now pass through, thumbnail
11
+ included.
12
+
3
13
  ## 0.34.1
4
14
 
5
15
  ### Fixed
@@ -132,6 +132,8 @@ class AttachmentClient {
132
132
  conversationType,
133
133
  conversationId: opts.groupId,
134
134
  recipientUserIds,
135
+ retentionSeconds: opts.retentionSeconds,
136
+ deleteWhenEveryoneHasIt: opts.deleteWhenEveryoneHasIt,
135
137
  });
136
138
  await this.uploadBytes(session, storedBytes, opts.onUploadProgress);
137
139
  await this.finalize(session.attachmentId, sha256);
@@ -83,6 +83,10 @@ export interface PrepareAttachmentOptions {
83
83
  mimeType?: string;
84
84
  /** Progress callback called with bytes uploaded so far. */
85
85
  onUploadProgress?: (bytesUploaded: number, totalBytes: number) => void;
86
+ /** How long this one file should live, in seconds. Never granted longer than your own retention. */
87
+ retentionSeconds?: number;
88
+ /** Delete the stored bytes as soon as every recipient has confirmed they have them. */
89
+ deleteWhenEveryoneHasIt?: boolean;
86
90
  /**
87
91
  * Optional preview thumbnail bytes. Entirely the developer's choice - if
88
92
  * provided, the SDK uploads it as a separate attachment (encrypted with the
package/dist/version.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * MINOR, additive feature (e.g. multi-device payloads, new call event type)
8
8
  * PATCH, bug-fix / perf improvement with no wire or API change
9
9
  */
10
- export declare const SDK_VERSION = "0.34.1";
10
+ export declare const SDK_VERSION = "0.34.2";
11
11
  /**
12
12
  * Binary encrypted-payload format version.
13
13
  * Included as the first byte of every encrypted payload so receivers can
package/dist/version.js CHANGED
@@ -10,7 +10,7 @@ exports.PROTOCOL_VERSION = exports.PAYLOAD_FORMAT_VERSION = exports.SDK_VERSION
10
10
  * MINOR, additive feature (e.g. multi-device payloads, new call event type)
11
11
  * PATCH, bug-fix / perf improvement with no wire or API change
12
12
  */
13
- exports.SDK_VERSION = '0.34.1';
13
+ exports.SDK_VERSION = '0.34.2';
14
14
  /**
15
15
  * Binary encrypted-payload format version.
16
16
  * Included as the first byte of every encrypted payload so receivers can
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@droponair/sdk-js",
3
- "version": "0.34.1",
3
+ "version": "0.34.2",
4
4
  "description": "End-to-end encrypted messaging, voice and video calling SDK. The relay never sees your keys or message content.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",