Make send delay configurable

This commit is contained in:
Jon Staab
2024-10-31 10:37:20 -07:00
parent 7988935537
commit df947e9fcf
5 changed files with 36 additions and 5 deletions
@@ -26,6 +26,7 @@
import ChannelMessage from "@app/components/ChannelMessage.svelte"
import ChannelCompose from "@app/components/ChannelCompose.svelte"
import {
userSettingValues,
userMembership,
decodeRelay,
makeChannelId,
@@ -52,7 +53,7 @@
const onSubmit = ({content, tags}: EventContent) => {
const event = createEvent(MESSAGE, {content, tags: append(tagRoom(room, url), tags)})
const thunk = publishThunk({event, relays: [url], delay: 3000})
const thunk = publishThunk({event, relays: [url], delay: $userSettingValues.send_delay})
thunks.update(assoc(thunk.event.id, thunk))
}