diff --git a/packages/app/src/thunk.ts b/packages/app/src/thunk.ts index 8a7feb0..bfe7ab5 100644 --- a/packages/app/src/thunk.ts +++ b/packages/app/src/thunk.ts @@ -1,5 +1,5 @@ import {Writable, Readable, writable, derived, get} from "svelte/store" -import {Deferred, TaskQueue, dissoc, identity, uniq, defer, sleep, assoc} from "@welshman/lib" +import {Deferred, fromPairs, TaskQueue, dissoc, identity, uniq, defer, sleep, assoc} from "@welshman/lib" import {stamp, own, hash} from "@welshman/signer" import { TrustedEvent, @@ -222,6 +222,14 @@ export const thunkQueue = new TaskQueue({ return } + // Update status to pending + thunk.status.set( + fromPairs( + thunk.request.relays + .map(url => [url, {status: PublishStatus.Pending, message: "Sending your message..."}]) + ) + ) + // Send it off const pub = new MultiPublish({ event: signedEvent,