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
+2 -2
View File
@@ -33,7 +33,7 @@
import ProfileList from "@app/components/ProfileList.svelte"
import ChatMessage from "@app/components/ChatMessage.svelte"
import ChatCompose from "@app/components/ChannelCompose.svelte"
import {deriveChat, splitChatId, PLATFORM_NAME, pubkeyLink} from "@app/state"
import {userSettingValues, deriveChat, splitChatId, PLATFORM_NAME, pubkeyLink} from "@app/state"
import {pushModal} from "@app/modal"
import {sendWrapped} from "@app/commands"
@@ -57,7 +57,7 @@
const onSubmit = async ({content, ...params}: EventContent) => {
const tags = [...params.tags, ...remove($pubkey!, pubkeys).map(tagPubkey)]
const template = createEvent(DIRECT_MESSAGE, {content, tags})
const thunk = await sendWrapped({template, pubkeys, delay: 3000})
const thunk = await sendWrapped({template, pubkeys, delay: $userSettingValues.send_delay})
thunks.update(assoc(thunk.thunks[0].event.id, thunk))
}