feat: add k tag to gift wraps and process only chat message rumors #30

Merged
reya merged 3 commits from only-nip17 into master 2026-04-10 02:41:21 +00:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 6f0cefed33 - Show all commits

View File

@@ -253,6 +253,13 @@ impl ChatRegistry {
event_map.insert(rumor.id.unwrap(), (event.id, dekey));
}
if rumor.kind != Kind::PrivateDirectMessage
|| rumor.kind != Kind::Custom(15)
{
log::info!("Rumor is not releated to NIP17");
continue;
}
// Check if the rumor has a recipient
if rumor.tags.is_empty() {
let signal =

View File

@@ -400,6 +400,10 @@ impl Room {
.await?
.into_iter()
.filter_map(|event| UnsignedEvent::from_json(&event.content).ok())
.filter(|event| {
// Filter out private direct messages and file messages
event.kind != Kind::PrivateDirectMessage && event.kind != Kind::Custom(15)
})
.sorted_by_key(|message| message.created_at)
.collect();