OverviewFilesCommitsIssuesDocsReleasesPeers

wirecore commits / daa47fc

Fix image push to wiredove: Extract and send imageData from feed
Bug: Images not appearing on pub.wiredove.net Cause: Bridge hardcoded imageData parameter as null Fix: - Extract entry.imageData from feed if present - Convert to data URL format (wiredove standard) - Format: data:image/jpeg;base64,{base64data} - Pass to relayClient.push() as 4th parameter Before: await this.relayClient.push(pubkey, yaml, signature, null) After: let imageData = null if (entry.imageData) { imageData = `data:${mimeType};base64,${entry.imageData}` } await this.relayClient.push(pubkey, yaml, signature, imageData) Log Output: "✓ Pushed post 9 (with image)" when image present Released: v4241 Next: Create new image test post to verify fix works Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
daa47fcc4c1bcb82b19f3043ef1076bc6f7ece42
by plankatron <fleeky@gmail.com> · 2026-01-22T19:14:49.000Z

Changed files (1) +11 -3

pear-app/bridge/wirecore-bridge.js +11 -3
……@@ -168,15 +168,23 @@ export class WirecoreBridge {
168168 // Extract YAML content
169169 const yaml = entry.yaml
170170
171 // Extract image data if present (convert to data URL format)
172 let imageData = null
173 if (entry.imageData) {
174 const mimeType = entry.imageMimeType || 'image/jpeg'
175 // Wiredove expects data URL format: data:image/jpeg;base64,...
176 imageData = `data:${mimeType};base64,${entry.imageData}`
177 }
178
171179 // Hash YAML content (base64, not base64url - ANProto uses base64)
172180 const contentHash = ANProto.hash(yaml)
173181
174182 // Sign the content hash (ANProto.sign adds timestamp internally)
175183 const signature = ANProto.sign(contentHash, this.anprotoKeypair)
176184
177 // Push to relay
178 await this.relayClient.push(pubkey, yaml, signature, null)
179 console.log(` ✓ Pushed post ${i}`)
185 // Push to relay (with image data if present)
186 await this.relayClient.push(pubkey, yaml, signature, imageData)
187 console.log(` ✓ Pushed post ${i}${imageData ? ' (with image)' : ''}`)
180188
181189 pushed++
182190