inbox-fix
All checks were successful
deploy / test (push) Successful in 1m4s

This commit is contained in:
Untone 2023-12-31 08:06:14 +03:00
parent 8879519b47
commit 3def328598

View File

@ -91,18 +91,10 @@ export const InboxView = (props: Props) => {
} }
} }
onMount(async () => { onMount(loadChats)
try {
const response = await loadRecipients() // time ago in seconds
setRecipients(response as unknown as Author[])
} catch (error) {
console.log(error)
}
await loadChats()
})
const handleSubmit = async (message: string) => { const handleSubmit = async (message: string) => {
await sendMessage({ sendMessage({
body: message, body: message,
chat_id: currentDialog()?.id.toString(), chat_id: currentDialog()?.id.toString(),
reply_to: messageToReply()?.id, reply_to: messageToReply()?.id,
@ -149,8 +141,8 @@ export const InboxView = (props: Props) => {
} }
} }
const findToReply = (messageId) => { const findToReply = (messageId: number) => {
return messages().find((message) => message.id === messageId) return messages().find((message: MessageType) => message.id === messageId)
} }
createEffect( createEffect(