fix: include slug and bskyPostRef in local state
f50fb5aa
1 file(s) · +4 −1
| 138 | 138 | contentHash = await getContentHash(localPost.rawContent); |
|
| 139 | 139 | } |
|
| 140 | 140 | ||
| 141 | - | // Update state |
|
| 141 | + | // Update state (preserve bskyPostRef from prior publishes) |
|
| 142 | + | const existing = state.posts[relativeFilePath]; |
|
| 142 | 143 | state.posts[relativeFilePath] = { |
|
| 143 | 144 | contentHash, |
|
| 144 | 145 | atUri: doc.uri, |
|
| 145 | 146 | lastPublished: doc.value.publishedAt, |
|
| 147 | + | slug: localPost.slug, |
|
| 148 | + | ...(existing?.bskyPostRef ? { bskyPostRef: existing.bskyPostRef } : {}), |
|
| 146 | 149 | }; |
|
| 147 | 150 | } else { |
|
| 148 | 151 | unmatchedCount++; |