Casual refactor of entire eventBuilder

This commit is contained in:
2023-04-14 16:02:15 +01:00
parent 914fa759a9
commit 36926d4346
33 changed files with 648 additions and 580 deletions

View File

@ -76,13 +76,14 @@ export default function ProfileSettings(props: ProfileSettingsProps) {
delete userCopy["zapService"];
console.debug(userCopy);
const ev = await publisher.metadata(userCopy);
console.debug(ev);
publisher.broadcast(ev);
if (publisher) {
const ev = await publisher.metadata(userCopy);
publisher.broadcast(ev);
const newProfile = mapEventToProfile(ev as TaggedRawEvent);
if (newProfile) {
await UserCache.set(newProfile);
const newProfile = mapEventToProfile(ev as TaggedRawEvent);
if (newProfile) {
await UserCache.set(newProfile);
}
}
}