diff --git a/ROADMAP.md b/ROADMAP.md
index 4346dacf..f86b5fd6 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,19 +1,13 @@
# Current
-- [ ] Move blog to nostr
-- [ ] Improve note rendering
- - [ ] Fix reactions and replies showing up
- - [x] Show all images in preview as slideshow or something
- - [x] Extract nostr: links and bech32 entities, hover
- - [x] Add nostr: links and bech32 entities in compose to tags
- - [x] Fix extra newlines when composing
-- [ ] Multiplexer
- - [ ] Announce multiplextr, paravel, coracle update w/url
- - [ ] Write NIP to support proxies. Update COUNT NIP to mention how proxies are a good use case for COUNT
+- [ ] Look into AUTH not working for mazin
+- [ ] Write NIP to support proxies. Update COUNT NIP to mention how proxies are a good use case for COUNT
+- [ ] Write blog post on multiplexer
+- [ ] Fix performance issues
+- [ ] Fix reactions and replies showing up
- [ ] Fix iOS/safari/firefox
- [ ] https://github.com/coracle-social/coracle/issues/42
- [ ] Multiplex, charge past a certain usage level based on bandwidth
-- [ ] Move blog to https://twitter.com/fiatjaf/status/1638514052014940162
- [ ] Add onError handler to subscriptions for when sockets fail to connect?
- [ ] Add bugsnag to multiplexr
diff --git a/src/agent/cmd.ts b/src/agent/cmd.ts
index 13d76885..20839aca 100644
--- a/src/agent/cmd.ts
+++ b/src/agent/cmd.ts
@@ -180,6 +180,7 @@ class PublishableEvent {
}
async publish(relays, onProgress = null) {
const event = await this.getSignedEvent()
+ //console.log(event); return
const promise = pool.publish({relays, event, onProgress})
sync.processEvents(event)
diff --git a/src/agent/relays.ts b/src/agent/relays.ts
index 78d252b0..08485301 100644
--- a/src/agent/relays.ts
+++ b/src/agent/relays.ts
@@ -57,10 +57,13 @@ export const getPubkeyRelays = (pubkey, mode = null, routesOverride = null) => {
let result = routesOverride || _getPubkeyRelaysCache.get(key)
if (!result) {
result = routes.all(filter)
- _getPubkeyRelaysCache.set(key, result)
+
+ if (result.length > 0) {
+ _getPubkeyRelaysCache.set(key, result)
+ }
}
- return sortByScore(map(pick(["url", "score"]), result))
+ return sortByScore(map(pick(["url", "score"]), uniqByUrl(result)))
}
export const getPubkeyReadRelays = pubkey => getPubkeyRelays(pubkey, "read")
diff --git a/src/partials/ContentEditable.svelte b/src/partials/ContentEditable.svelte
index 18c137c4..480bb5b2 100644
--- a/src/partials/ContentEditable.svelte
+++ b/src/partials/ContentEditable.svelte
@@ -56,16 +56,11 @@
let annotations = []
for (const child of node.childNodes) {
- const lineBreaks = child.querySelectorAll?.("br") || []
-
if (child.tagName === "BR") {
- continue
+ content += "\n"
}
- // Line breaks may be bare brs or divs wrapping brs
- if (lineBreaks.length > 0) {
- content += "\n".repeat(lineBreaks.length)
- } else if (isLineBreak(child)) {
+ if (child.tagName === "DIV" && !child.querySelector("br")) {
content += "\n"
}
diff --git a/src/routes/PersonDetail.svelte b/src/routes/PersonDetail.svelte
index a906f08a..318b6501 100644
--- a/src/routes/PersonDetail.svelte
+++ b/src/routes/PersonDetail.svelte
@@ -31,7 +31,6 @@
const interpolate = (a, b) => t => a + Math.round((b - a) * t)
const {petnamePubkeys, canPublish, mutes} = user
- const getRelays = () => sampleRelays(relays.concat(getPubkeyWriteRelays(pubkey)))
const tabs = ["notes", "likes", pool.forceUrls.length === 0 && "relays"].filter(identity)
let pubkey = toHex(npub)
@@ -44,6 +43,9 @@
let actions = []
let rgb, rgba
+ $: ownRelays = getPubkeyWriteRelays(pubkey)
+ $: relays = sampleRelays(relays.concat(ownRelays))
+
$: {
const color = parseHex(getThemeColor($theme, "gray-8"))
@@ -101,6 +103,7 @@
// Refresh our person
network.loadPeople([pubkey], {force: true}).then(() => {
+ ownRelays = getPubkeyWriteRelays(pubkey)
person = getPersonWithFallback(pubkey)
loading = false
})
@@ -114,8 +117,8 @@
const followers = new Set()
await network.load({
+ relays,
shouldProcess: false,
- relays: getRelays(),
filter: [{kinds: [3], "#p": [pubkey]}],
onChunk: events => {
for (const e of events) {
@@ -143,7 +146,7 @@
}
const follow = async () => {
- const [{url}] = getRelays()
+ const [{url}] = relays
user.addPetname(pubkey, url, displayPerson(person))
}
@@ -244,8 +247,8 @@
{:else if activeTab === "likes"}
- Enter a custom proxy server for multiplexing relay connections. This can drastically
- improve resource usage, but has some privacy trade-offs. Leave blank to connect to relays
- directly. You can find the source code
+ Enter a custom proxy server for multiplexing relay connections. This can drastically
+ improve resource usage, but has some privacy trade-offs. Leave blank to connect to
+ relays directly. You can find the source code