Commit shadow merge and drop dead recipients branch
mergeProfileShadow mutated relatedProfiles in place but never invalidated the snapshot, so block/mute shadow updates didn't render until an unrelated commit. Call commit() after merging. Also drop the recipients branch, which never ran since recipients is never assigned. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Samuel Newman
parent
fef1bad264
commit
ffaa796473
@@ -133,15 +133,10 @@ export class Convo {
|
|||||||
snapshot: ConvoState | undefined
|
snapshot: ConvoState | undefined
|
||||||
|
|
||||||
mergeProfileShadow(did: string, shadow: Partial<ProfileShadow>) {
|
mergeProfileShadow(did: string, shadow: Partial<ProfileShadow>) {
|
||||||
this.recipients?.map((recipient, i) => {
|
|
||||||
if (recipient.did === did) {
|
|
||||||
const merged = mergeShadow(recipient, shadow)
|
|
||||||
this.recipients![i] = merged
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const related = this.relatedProfiles.get(did)
|
const related = this.relatedProfiles.get(did)
|
||||||
if (related) {
|
if (related) {
|
||||||
this.relatedProfiles.set(did, mergeShadow(related, shadow))
|
this.relatedProfiles.set(did, mergeShadow(related, shadow))
|
||||||
|
this.commit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user