diff --git a/README.md b/README.md index 769c35a..6932041 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ mirrored on [GitHub](https://github.com/scsibug/nostr-rs-relay). - [x] NIP-20: [Command Results](https://github.com/nostr-protocol/nips/blob/master/20.md) - [x] NIP-22: [Event `created_at` limits](https://github.com/nostr-protocol/nips/blob/master/22.md) (_future-dated events only_) - [x] NIP-26: [Event Delegation](https://github.com/nostr-protocol/nips/blob/master/26.md) +- [x] NIP-28: [Public Chat](https://github.com/nostr-protocol/nips/blob/master/28.md) ## Quick Start diff --git a/src/db.rs b/src/db.rs index a224231..c9e95c1 100644 --- a/src/db.rs +++ b/src/db.rs @@ -399,7 +399,7 @@ pub fn write_event(conn: &mut PooledConnection, e: &Event) -> Result { // if this event is replaceable update, hide every other replaceable // event with the same kind from the same author that was issued // earlier than this. - if e.kind == 0 || e.kind == 3 || (e.kind >= 10000 && e.kind < 20000) { + if e.kind == 0 || e.kind == 3 || e.kind == 41 || (e.kind >= 10000 && e.kind < 20000) { let update_count = tx.execute( "UPDATE event SET hidden=TRUE WHERE id!=? AND kind=? AND author=? AND created_at <= ? and hidden!=TRUE", params![ev_id, e.kind, hex::decode(&e.pubkey).ok(), e.created_at], diff --git a/src/event.rs b/src/event.rs index f443ef0..0fc938d 100644 --- a/src/event.rs +++ b/src/event.rs @@ -101,7 +101,6 @@ impl From for Result { } impl Event { - #[cfg(test)] pub fn simple_event() -> Event { Event {