From 95a24abd0f72a0a9fa6bad0ba8f6fccb32f76657 Mon Sep 17 00:00:00 2001 From: Jonathan Staab Date: Wed, 27 Sep 2023 09:59:22 -0700 Subject: [PATCH] Remove nip28 chat --- CONTRIBUTING.md | 3 +- README.md | 28 +++-- src/app/ForegroundButtons.svelte | 4 +- src/app/ModalRoutes.svelte | 3 - src/app/Routes.svelte | 8 -- src/app/SideNav.svelte | 7 +- src/app/TopNav.svelte | 3 +- src/app/shared/NoteContentKind40.svelte | 20 ++-- src/app/views/ChatDetail.svelte | 107 ------------------- src/app/views/ChatEdit.svelte | 64 ------------ src/app/views/ChatList.svelte | 130 ------------------------ src/app/views/ChatListItem.svelte | 57 ----------- src/engine/channels/commands.ts | 46 +-------- src/engine/channels/derived.ts | 17 +--- src/engine/channels/model.ts | 12 +-- src/engine/channels/projections.ts | 118 +-------------------- src/engine/channels/requests.ts | 16 +-- src/engine/channels/utils.ts | 4 - src/engine/notifications/requests.ts | 8 -- src/engine/session/model.ts | 1 - src/util/nostr.ts | 2 - 21 files changed, 38 insertions(+), 620 deletions(-) delete mode 100644 src/app/views/ChatDetail.svelte delete mode 100644 src/app/views/ChatEdit.svelte delete mode 100644 src/app/views/ChatList.svelte delete mode 100644 src/app/views/ChatListItem.svelte diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0677e62f..7d04c907 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -118,4 +118,5 @@ An important goal for the UX is speed without reflow due to late-arriving events I'm still working through the privacy tradeoff. In general, I opt for the public version of any primitive (follows, relays list) so that more sophisticated functionality can be built on top of open social graphs. However, in the case of application-specific settings and usage data, there is no benefit to sharing that information publicly, and so it is encrypted. One of the main goals of Coracle is also to eventually support private groups alongside public notes, which will present a tricky design challenge. -Coracle only has support for DMs and chat because it was added early on and people use it. These are not the priority of the project, and hopefully can be replaced with an embedded micro-app at some point in the future. Insofar as certain NIPs can augment regular social content (public and private) however, they should be supported. This includes things like Data Vending Machines and Client recommendations. Rendering support is included for long-form posts, profile updates, and more, and advanced search and custom feeds are an area of research I'm interested in pushing forward. +Coracle only has support for DMs because it was added early on and people use it. These are not the priority of the project, and hopefully can be replaced with an embedded micro-app at some point in the future. Insofar as certain NIPs can augment regular social content (public and private) however, they should be supported. This includes things like Data Vending Machines and Client recommendations. Rendering support is included for long-form posts, profile updates, and more, and advanced search and custom feeds are an area of research I'm interested in pushing forward. + diff --git a/README.md b/README.md index 520f8e67..4240f41f 100644 --- a/README.md +++ b/README.md @@ -10,28 +10,36 @@ If you like Coracle and want to support its development, you can donate sats via - [x] Threads/social - [x] Profile search using NIP-50 -- [x] Login via extension +- [x] Login via extension, nsecbunker, and pubkey - [x] Profile sharing via QR codes - [x] NIP 05 verification -- [x] Bech32 entity search -- [x] Notifications -- [x] Chat and direct messages +- [x] NIP 65 relay selection and NIP 32 relay reviews +- [x] NIP 89 app recommendations +- [x] NIP 32 labeling and recommendations +- [x] Bech32 entity search and scan +- [x] Mention, reply, and reaction notifications +- [x] Direct messages - NIP 04 and NIP 24 - [x] Note composition with mentions and topics -- [x] Profile pages, follow/unfollow -- [x] Thread and person muting, collapse thread -- [x] Smart relay selection and display +- [x] Content warnings, mute, and keyword mute +- [x] Profile pages, follow/unfollow, follow/follower count +- [x] Thread muting, collapse thread - [x] Invoice, quote, mention, link, image, and video rendering - [x] Installable as a progressive web app -- [x] Integrated media uploads -- [x] Lightning zaps +- [x] Integrated media uploads via nostr.build +- [x] Lightning zaps and reactions - [x] Feeds customizable by person, relay, and topic using NIP-51 - [x] AUTH (NIP-42) support for paid relays - [x] Multiplextr support for reducing bandwidth - [x] Profile and note metadata - [x] White-labeling support -- [ ] Exportable copy of all user events +- [x] NIP 51 person lists +- [x] Exportable copy of all user events - [ ] Reporting and basic distributed moderation - [ ] Content and person recommendations +- [ ] Private groups including administration, moderation, and membership +- [ ] Cross-posting between groups and public nostr +- [ ] Public and private calendar events +- [ ] Public and private marketplaces You can find a more complete changelog [here](./CHANGELOG.md). diff --git a/src/app/ForegroundButtons.svelte b/src/app/ForegroundButtons.svelte index 6c8131af..5faaf9cb 100644 --- a/src/app/ForegroundButtons.svelte +++ b/src/app/ForegroundButtons.svelte @@ -10,9 +10,7 @@ let scrollY = 0 let playerIsOpen = false - $: showButtons = !$location.pathname.match( - /conversations|channels|chat|relays|keys|settings|logout$/ - ) + $: showButtons = !$location.pathname.match(/conversations|channels|relays|keys|settings|logout$/) const scrollToTop = () => document.body.scrollIntoView({behavior: "smooth"}) diff --git a/src/app/ModalRoutes.svelte b/src/app/ModalRoutes.svelte index 3ee218e5..6a84fbf9 100644 --- a/src/app/ModalRoutes.svelte +++ b/src/app/ModalRoutes.svelte @@ -2,7 +2,6 @@ import {nip19} from "nostr-tools" import Content from "src/partials/Content.svelte" import Spinner from "src/partials/Spinner.svelte" - import ChatEdit from "src/app/views/ChatEdit.svelte" import ChannelCreate from "src/app/views/ChannelCreate.svelte" import Login from "src/app/views/Login.svelte" import LoginConnect from "src/app/views/LoginConnect.svelte" @@ -61,8 +60,6 @@ {:else if m.type === "channel/create"} -{:else if m.type === "chat/edit"} - {:else if m.type === "login/intro"} {:else if m.type === "login/privkey"} diff --git a/src/app/Routes.svelte b/src/app/Routes.svelte index e87e7606..2b61b62e 100644 --- a/src/app/Routes.svelte +++ b/src/app/Routes.svelte @@ -4,8 +4,6 @@ import {base64DecodeOrPlainWebSocketURL} from "src/util/misc" import Notifications from "src/app/views/Notifications.svelte" import Bech32Entity from "src/app/views/Bech32Entity.svelte" - import ChatDetail from "src/app/views/ChatDetail.svelte" - import ChatList from "src/app/views/ChatList.svelte" import Feeds from "src/app/views/Feeds.svelte" import Explore from "src/app/views/Explore.svelte" import UserKeys from "src/app/views/UserKeys.svelte" @@ -47,12 +45,6 @@ {/key} - - - {#key params.entity} - - {/key} - diff --git a/src/app/SideNav.svelte b/src/app/SideNav.svelte index 3065b719..fbdbf0d4 100644 --- a/src/app/SideNav.svelte +++ b/src/app/SideNav.svelte @@ -3,7 +3,6 @@ import {modal, theme, installPrompt} from "src/partials/state" import Anchor from "src/partials/Anchor.svelte" import { - hasNewNip28Messages, hasNewNip04Messages, hasNewNip24Messages, hasNewNotifications, @@ -87,15 +86,11 @@ {/if} -
  • +
  • Chat - {#if $hasNewNip28Messages} -
  • diff --git a/src/app/TopNav.svelte b/src/app/TopNav.svelte index 622ccd04..f8c8f69a 100644 --- a/src/app/TopNav.svelte +++ b/src/app/TopNav.svelte @@ -25,7 +25,6 @@ peopleWithName, session, canUseGiftWrap, - hasNewNip28Messages, hasNewNip04Messages, hasNewNip24Messages, hasNewNotifications, @@ -183,7 +182,7 @@