Add editable own profile + navigation fixes

- ProfileView shows edit form when viewing own profile
- publishProfile (kind 0) added to nostr lib
- Sidebar name/avatar opens own profile
- Back button in edit mode cancels form; outside edit mode navigates back
- goBack safeguard: falls back to feed if previousView === currentView
- Fix ThreadView crash when selectedNote is null
- Tighten feed filter for base64 blobs and protocol messages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jure
2026-03-08 19:19:24 +01:00
parent bf1d68bb93
commit b465ad03a3
7 changed files with 186 additions and 62 deletions

View File

@@ -42,7 +42,11 @@ export function Feed() {
const filteredNotes = activeNotes.filter((event) => {
const c = event.content.trim();
return c.length > 0 && !c.startsWith("{") && !c.startsWith("[");
if (!c || c.startsWith("{") || c.startsWith("[")) return false;
// Filter out notes that look like base64 blobs or relay protocol messages
if (c.length > 500 && /^[A-Za-z0-9+/=]{50,}$/.test(c.slice(0, 100))) return false;
if (c.startsWith("nlogpost:") || c.startsWith("T1772")) return false;
return true;
});
return (