| 1827 | }; | 1827 | }; |
| 1828 | | 1828 | |
| 1829 | await uploadUserAvatar(getUserAvatar(avatarId), newAvatarId); | 1829 | await uploadUserAvatar(getUserAvatar(avatarId), newAvatarId); |
| | 1830 | |
| | 1831 | const eventData = { |
| | 1832 | avatarId: newAvatarId, |
| | 1833 | name: personaName, |
| | 1834 | description: descriptor?.description ?? '', |
| | 1835 | title: descriptor?.title ?? '', |
| | 1836 | duplicatedFromAvatarId: avatarId, |
| | 1837 | }; |
| | 1838 | await eventSource.emit(event_types.PERSONA_CREATED, eventData); |
| | 1839 | |
| 1830 | await getUserAvatars(true, newAvatarId); | 1840 | await getUserAvatars(true, newAvatarId); |
| 1831 | saveSettingsDebounced(); | 1841 | saveSettingsDebounced(); |
| 1832 | } | 1842 | } |