office: carry role + owner key from invite into doc metadata (fixes empty doc / rejected ops on recipient)
- Commit
b46ea3da44878b7fe373dfa819115c3c8264107f- Author
- Vayun Mathur <[email protected]>
- When
- 2026-07-06 14:49 UTC (5 months ago)
- Parents
b6519fa
Diff
office/src/main/java/com/vayunmathur/office/util/OfficeViewModel.kt
diff --git a/office/src/main/java/com/vayunmathur/office/util/OfficeViewModel.kt b/office/src/main/java/com/vayunmathur/office/util/OfficeViewModel.ktindex 1b1d68860f..7eb147bc12 100644--- a/office/src/main/java/com/vayunmathur/office/util/OfficeViewModel.kt+++ b/office/src/main/java/com/vayunmathur/office/util/OfficeViewModel.kt@@ -2070,7 +2070,7 @@ class OfficeViewModel(application: Application) : AndroidViewModel(application) val index = loadIndex(ds).associateBy { it.docId }.toMutableMap() for (inv in res.invites) { if (!index.containsKey(inv.docId)) {- index[inv.docId] = OfficeDocMeta(inv.docId, inv.title, inv.key, owner = false, charMode = inv.charMode)+ index[inv.docId] = OfficeDocMeta(inv.docId, inv.title, inv.key, owner = false, charMode = inv.charMode, role = inv.role, ownerKeyB64 = inv.ownerKey) } } saveIndex(ds, index.values.toList())