Update badge information correctly when updating user profile

Co-authored-by: yash-signal <yash@signal.org>
This commit is contained in:
automated-signal
2025-09-17 10:51:59 -05:00
committed by GitHub
parent 1b18007c75
commit 6b9f99ff7d

View File

@@ -73,7 +73,9 @@ export async function encryptProfileData(
name: Bytes.toBase64(bytesName),
about: bytesAbout ? Bytes.toBase64(bytesAbout) : null,
aboutEmoji: bytesAboutEmoji ? Bytes.toBase64(bytesAboutEmoji) : null,
badgeIds: (badges || []).map(({ id }) => id),
badgeIds: (badges || [])
.filter(badge => 'isVisible' in badge && badge.isVisible)
.map(({ id }) => id),
paymentAddress: window.storage.get('paymentAddress') || null,
avatar: Boolean(newAvatar),
sameAvatar,