Fix chat sending

This commit is contained in:
Jonathan Staab 2023-01-23 20:01:09 -08:00
parent 2d92c13613
commit c5ce8cf0d5
7 changed files with 23 additions and 20 deletions

View File

@ -45,6 +45,7 @@ If you like Coracle and want to support its development, you can donate sats via
# Bugs # Bugs
- [ ] Everything waits for even the slowest relay to connect before returning events
- [ ] Alerts are not showing likes, just generally screwy. Maybe because I threadify before adding to the db? - [ ] Alerts are not showing likes, just generally screwy. Maybe because I threadify before adding to the db?
- [ ] Sync mentions box and in-reply mentions - [ ] Sync mentions box and in-reply mentions
- [ ] Add petnames for channels - [ ] Add petnames for channels

View File

@ -169,7 +169,6 @@ const subscribe = async (relays, filters) => {
}) })
)) ))
return { return {
subs, subs,
unsub: () => { unsub: () => {

View File

@ -71,6 +71,8 @@ setTimeout(() => {
return false return false
} }
event.setUser(session)
return true return true
}) })
}) })

View File

@ -2,7 +2,10 @@ import 'src/app.css'
import Bugsnag from "@bugsnag/js" import Bugsnag from "@bugsnag/js"
Bugsnag.start({apiKey: "2ea412feabfe14dc9849c6f0b4fa7003"}) Bugsnag.start({
apiKey: "2ea412feabfe14dc9849c6f0b4fa7003",
collectUserIp: false,
})
import App from 'src/App.svelte' import App from 'src/App.svelte'

View File

@ -17,7 +17,7 @@
{/if} {/if}
{#if size === '2xl'} {#if size === '2xl'}
<div {...$$props} class={cx($$props.class, className, "py-8 p-4 max-w-2xl")}> <div {...$$props} class={cx($$props.class, className, "p-4 lg:py-8 max-w-2xl")}>
<slot /> <slot />
</div> </div>
{/if} {/if}

View File

@ -46,21 +46,19 @@
}) })
</script> </script>
<Content> {#if newNotes.length > 0}
{#if newNotes.length > 0} <div
<div in:slide
in:slide class="cursor-pointer text-center underline text-light"
class="cursor-pointer text-center underline text-light" on:click={showNewNotes}>
on:click={showNewNotes}> Load {quantify(newNotes.length, 'new note')}
Load {quantify(newNotes.length, 'new note')} </div>
</div> {/if}
{/if}
<div> <div>
{#each notes as note (note.id)} {#each notes as note (note.id)}
<Note {note} {depth} /> <Note {note} {depth} />
{/each} {/each}
</div> </div>
<Spinner /> <Spinner />
</Content>

View File

@ -60,7 +60,7 @@
} }
const sendMessage = content => const sendMessage = content =>
cmd.createChannelMessage(getRelays(), roomId, content) cmd.createChatMessage(getRelays(), roomId, content)
</script> </script>
<Channel <Channel