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

@ -10,14 +10,10 @@ export default function useModeration() {
const publisher = useEventPublisher();
async function setMutedList(pub: HexKey[], priv: HexKey[]) {
try {
if (publisher) {
const ev = await publisher.muted(pub, priv);
if (ev) {
publisher.broadcast(ev);
return ev.created_at * 1000;
}
} catch (error) {
console.debug("Couldn't change mute list");
publisher.broadcast(ev);
return ev.created_at * 1000;
}
return 0;
}