This commit is contained in:
parent
8879519b47
commit
3def328598
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user