Deprecate creating relationships Bookmarks and Curates (which aren't easily workable as relationships)

This commit is contained in:
Mike Dilger 2024-07-02 07:29:36 +12:00
parent 1a763189a1
commit 4f5c3a36c0
2 changed files with 11 additions and 0 deletions

View File

@ -697,6 +697,13 @@ pub(crate) fn process_relationships_of_event<'a>(
} }
} }
/*
Bookmarks as relationships don't work well because it is
expensive to clear all relationships that are bookmarks
when rewriting them to match a new bookmark list event.
So we are retiring creating this relationships (and may
delete them later)
// ListBookmarks // ListBookmarks
if event.kind == EventKind::BookmarkList { if event.kind == EventKind::BookmarkList {
for tag in &event.tags { for tag in &event.tags {
@ -765,6 +772,8 @@ pub(crate) fn process_relationships_of_event<'a>(
} }
} }
*/
if event.kind == EventKind::LiveChatMessage { if event.kind == EventKind::LiveChatMessage {
for tag in &event.tags { for tag in &event.tags {
if let Ok((ea, _marker)) = tag.parse_address() { if let Ok((ea, _marker)) = tag.parse_address() {

View File

@ -36,9 +36,11 @@ pub enum RelationshipById2 {
Pins, Pins,
// NIP-51 Lists // NIP-51 Lists
// @deprecatred, doesn't work well as a relationship
Bookmarks, Bookmarks,
// NIP-51 Lists // NIP-51 Lists
// @deprecatred, doesn't work well as a relationship
Curates, Curates,
// NIP-56 Reporting // NIP-56 Reporting