Pins survive a backup, and a pin keeps what this app cannot show

The vector's canonical set just widened to every field both engines carry,
and pins was the one this app failed: it never read or wrote them, so a
pinned message was lost crossing in either direction and nothing said so.

A pin is kept whole now, at and by included, though this app shows
neither. Dropping a field an engine cannot render turns a backup into a
lossy hop: restore an iPhone through an Android phone and the pins come
back stripped of who pinned them and when. The vault keeps the record
rather than just the mid, so setting a pin here no longer discards what
travelled with it.

Import merges into gaps, like the drafts beside it: a pin set on THIS
phone is the current one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Paul Hitt
2026-09-16 14:40:15 -04:00
co-authored by Claude Opus 5
parent 5fda2954c1
commit 1049c1d118
2 changed files with 51 additions and 2 deletions
@@ -164,6 +164,11 @@ object BackupPayload {
if (out.length() > 0) root.put("storyArchive", out)
}
internal.optJSONObject("drafts")?.takeIf { it.length() > 0 }?.let { root.put("drafts", it) }
// Carried whole, `at` and `by` included, though this app shows neither.
// Dropping a field an engine cannot use turns a backup into a lossy
// hop: restore an iPhone through an Android phone and the pins come
// back stripped of who pinned them and when.
internal.optJSONObject("pins")?.takeIf { it.length() > 0 }?.let { root.put("pins", it) }
internal.optJSONObject("polls")?.takeIf { it.length() > 0 }?.let { root.put("polls", it) }
internal.optJSONObject("presenceTokensIssued")?.takeIf { it.length() > 0 }?.let {
root.put("presenceTokensIssued", it)
@@ -362,6 +367,7 @@ object BackupPayload {
if (restored.length() > 0) out.put("storyArchive", JSONObject().put("items", restored))
}
shared.optJSONObject("drafts")?.takeIf { it.length() > 0 }?.let { out.put("drafts", it) }
shared.optJSONObject("pins")?.takeIf { it.length() > 0 }?.let { out.put("pins", it) }
shared.optJSONObject("polls")?.takeIf { it.length() > 0 }?.let { out.put("polls", it) }
shared.optJSONObject("presenceTokensIssued")?.takeIf { it.length() > 0 }?.let {
out.put("presenceTokensIssued", it)