From c5ce8cf0d5891136004c4d0893fd442445b2eeaf Mon Sep 17 00:00:00 2001 From: Jonathan Staab Date: Mon, 23 Jan 2023 20:01:09 -0800 Subject: [PATCH] Fix chat sending --- README.md | 1 + src/agent/pool.js | 1 - src/app/ui.js | 2 ++ src/main.js | 5 ++++- src/partials/Content.svelte | 2 +- src/partials/Notes.svelte | 30 ++++++++++++++---------------- src/routes/ChatRoom.svelte | 2 +- 7 files changed, 23 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 475fee87..915c619c 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ If you like Coracle and want to support its development, you can donate sats via # 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? - [ ] Sync mentions box and in-reply mentions - [ ] Add petnames for channels diff --git a/src/agent/pool.js b/src/agent/pool.js index e6c52382..45e480e8 100644 --- a/src/agent/pool.js +++ b/src/agent/pool.js @@ -169,7 +169,6 @@ const subscribe = async (relays, filters) => { }) )) - return { subs, unsub: () => { diff --git a/src/app/ui.js b/src/app/ui.js index 735e54b9..3bd58ef0 100644 --- a/src/app/ui.js +++ b/src/app/ui.js @@ -71,6 +71,8 @@ setTimeout(() => { return false } + event.setUser(session) + return true }) }) diff --git a/src/main.js b/src/main.js index 536970a4..fbc6d284 100644 --- a/src/main.js +++ b/src/main.js @@ -2,7 +2,10 @@ import 'src/app.css' import Bugsnag from "@bugsnag/js" -Bugsnag.start({apiKey: "2ea412feabfe14dc9849c6f0b4fa7003"}) +Bugsnag.start({ + apiKey: "2ea412feabfe14dc9849c6f0b4fa7003", + collectUserIp: false, +}) import App from 'src/App.svelte' diff --git a/src/partials/Content.svelte b/src/partials/Content.svelte index 4b20a2a6..2f9fb055 100644 --- a/src/partials/Content.svelte +++ b/src/partials/Content.svelte @@ -17,7 +17,7 @@ {/if} {#if size === '2xl'} -
+
{/if} diff --git a/src/partials/Notes.svelte b/src/partials/Notes.svelte index cfe359c3..0207d9f2 100644 --- a/src/partials/Notes.svelte +++ b/src/partials/Notes.svelte @@ -46,21 +46,19 @@ }) - - {#if newNotes.length > 0} -
- Load {quantify(newNotes.length, 'new note')} -
- {/if} +{#if newNotes.length > 0} +
+ Load {quantify(newNotes.length, 'new note')} +
+{/if} -
- {#each notes as note (note.id)} - - {/each} -
+
+ {#each notes as note (note.id)} + + {/each} +
- -
+ diff --git a/src/routes/ChatRoom.svelte b/src/routes/ChatRoom.svelte index 6032c093..598c85b1 100644 --- a/src/routes/ChatRoom.svelte +++ b/src/routes/ChatRoom.svelte @@ -60,7 +60,7 @@ } const sendMessage = content => - cmd.createChannelMessage(getRelays(), roomId, content) + cmd.createChatMessage(getRelays(), roomId, content)