feat(sns-export): add record owner to arkmejson header

This commit is contained in:
tisonhuang
2026-03-04 13:26:07 +08:00
parent 6314c0f1d6
commit 3a878dd019

View File

@@ -1413,10 +1413,21 @@ class SnsService {
} }
} }
const ownerWxid = this.toOptionalString(this.configService.get('myWxid'))
const ownerIdentity = ownerWxid
? await this.resolveContactIdentity(ownerWxid, identityCache)
: null
const recordOwner = ownerIdentity
? { ...ownerIdentity }
: ownerWxid
? { username: ownerWxid, wxid: ownerWxid, displayName: ownerWxid }
: { username: '', wxid: '', displayName: '' }
const exportData = { const exportData = {
exportTime: new Date().toISOString(), exportTime: new Date().toISOString(),
format: 'arkmejson', format: 'arkmejson',
schemaVersion: '1.0.0', schemaVersion: '1.0.0',
recordOwner,
mediaSelection: { mediaSelection: {
images: shouldExportImages, images: shouldExportImages,
livePhotos: shouldExportLivePhotos, livePhotos: shouldExportLivePhotos,