diff --git a/ROADMAP.md b/ROADMAP.md
index fffef987..7318e73b 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,8 +1,10 @@
# Current
+- [ ] Buttons on profile detail is broken
- [ ] Topics
- - [ ] Improve topic suggestions and rendering
- - [ ] Add topic search, keep cache of topics
+ - [x] Improve topic suggestions and rendering
+ - [x] Add topic search, keep cache of topics
+ - [ ] Add ability to follow topics
- [ ] Relays bounty
- [ ] Ability to create custom feeds
- [ ] Add global/following/network tabs to relay detail
@@ -69,7 +71,7 @@
- [ ] Review QR codes, search, basic affordances for link navigation
- [ ] Add delete button to notes
- [ ] Log in as user button
-- [ ] Separate notifications out by type, mute certain kinds
+- [ ] Separate notifications out by type, mute certain kinds. Likes are extraneous
- [ ] Relay recommendations based on follows/followers
- [ ] Make the note relays button modal make sense, one relay with no explanation is not good
- [ ] Linkify invoices
diff --git a/src/agent/db.ts b/src/agent/db.ts
index b4dc19e4..71eb485f 100644
--- a/src/agent/db.ts
+++ b/src/agent/db.ts
@@ -6,6 +6,7 @@ import {throttle} from "throttle-debounce"
import {writable} from "svelte/store"
import {ensurePlural, noop, createMap} from "hurdak/lib/hurdak"
import {Tags} from "src/util/nostr"
+import {fuzzy} from "src/util/misc"
import user from "src/agent/user"
const Adapter = window.indexedDB ? IncrementalIndexedDBAdapter : Loki.LokiMemoryAdapter
@@ -224,3 +225,9 @@ export const onReady = cb => {
}
})
}
+
+export const searchPeople = watch("people", t =>
+ fuzzy(t.all({"kind0.name": {$type: "string"}}), {
+ keys: ["kind0.name", "kind0.about", "pubkey"],
+ })
+)
diff --git a/src/agent/sync.ts b/src/agent/sync.ts
index 113256b1..358975e0 100644
--- a/src/agent/sync.ts
+++ b/src/agent/sync.ts
@@ -344,7 +344,7 @@ addHandler(10002, e => {
// Topics
const processTopics = e => {
- const matches = Array.from(e.content.matchAll(/#(\w{2,100})/g))
+ const matches = Array.from(e.content.toLowerCase().matchAll(/#(\w{2,100})/g))
if (matches.length > 0) {
topics.patch(matches.map(nth(1)).map(objOf("name")))
diff --git a/src/app/EnsureData.svelte b/src/app/EnsureData.svelte
index 5009d339..8dcc7a32 100644
--- a/src/app/EnsureData.svelte
+++ b/src/app/EnsureData.svelte
@@ -72,7 +72,7 @@
Search below to find some interesting people.
{/each}
-
+
{:else if needsPeople()}
diff --git a/src/app/shared/NoteContent.svelte b/src/app/shared/NoteContent.svelte
index e63fbda1..93bd645e 100644
--- a/src/app/shared/NoteContent.svelte
+++ b/src/app/shared/NoteContent.svelte
@@ -122,7 +122,7 @@
{/each}
{:else if type === "topic"}
- openTopic(value)}>{value}
+ openTopic(value)}>#{value}
{:else if type === "link"}
{value.replace(/https?:\/\/(www\.)?/, "")}
diff --git a/src/app/shared/PersonSearch.svelte b/src/app/shared/PersonSearch.svelte
index a8e0fee7..4c30af02 100644
--- a/src/app/shared/PersonSearch.svelte
+++ b/src/app/shared/PersonSearch.svelte
@@ -1,42 +1,28 @@
{#each results as person (person.pubkey)}
- {#if person.pubkey !== user.getPubkey() && !(hideFollowing && $petnamePubkeys.includes(person.pubkey))}
+ {#if person.pubkey !== user.getPubkey()}
{/if}
{:else}
diff --git a/src/app/views/Search.svelte b/src/app/views/Search.svelte
index d8006cda..fbce62ac 100644
--- a/src/app/views/Search.svelte
+++ b/src/app/views/Search.svelte
@@ -1,16 +1,62 @@
- Profile Search
+ Search
- Search for people on Nostr. For now, only profiles that have already been loaded will appear
- in search results.
+ Search for people and topics on Nostr. For now, only results that have already been loaded
+ will appear in search results.