@telecrypt-io/storage 0.6.0 → 0.6.1
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.
|
@@ -26,6 +26,8 @@ export interface TreeSpace {
|
|
|
26
26
|
}
|
|
27
27
|
export interface FileBranch {
|
|
28
28
|
readonly id: string;
|
|
29
|
+
/** Matrix SDK keeps a redacted branch in state as an inactive object. */
|
|
30
|
+
readonly isActive?: boolean;
|
|
29
31
|
getName(): string;
|
|
30
32
|
setName(name: string): Promise<void>;
|
|
31
33
|
delete(): Promise<void>;
|
package/dist/core/operations.js
CHANGED
|
@@ -1229,7 +1229,10 @@ export async function deleteFile(storage, treeId, fileId, options) {
|
|
|
1229
1229
|
await storage.refreshRoomState(tree.id, { signal });
|
|
1230
1230
|
ensureOperationActive(signal);
|
|
1231
1231
|
const current = tree.getFile(fileId);
|
|
1232
|
-
|
|
1232
|
+
// Matrix SDK keeps a redacted branch event in room state as an
|
|
1233
|
+
// inactive branch. Treat both an absent branch and that redacted
|
|
1234
|
+
// inactive branch as confirmed deletion.
|
|
1235
|
+
return !current || current.isActive === false ? true : null;
|
|
1233
1236
|
}, { timeoutMs: 15000, signal });
|
|
1234
1237
|
}
|
|
1235
1238
|
catch (error) {
|