add kinds

This commit is contained in:
1l0
2024-10-06 01:18:52 +09:00
committed by fiatjaf_
parent 27bd9bfc8c
commit f08e4e9af7
3 changed files with 84 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ import (
func GetDMRelays(ctx context.Context, pubkey string, pool *nostr.SimplePool, relaysToQuery []string) []string {
ie := pool.QuerySingle(ctx, relaysToQuery, nostr.Filter{
Authors: []string{pubkey},
Kinds: []int{10050},
Kinds: []int{nostr.KindDMRelayList},
})
if ie == nil {
return nil
@@ -102,7 +102,7 @@ func PrepareMessage(
}
rumor := nostr.Event{
Kind: 14,
Kind: nostr.KindDirectMessage,
Content: content,
Tags: append(tags, nostr.Tag{"p", recipientPubKey}),
CreatedAt: nostr.Now(),
@@ -156,7 +156,7 @@ func ListenForMessages(
for ie := range pool.SubMany(ctx, ourRelays, nostr.Filters{
{
Kinds: []int{1059},
Kinds: []int{nostr.KindGiftWrap},
Tags: nostr.TagMap{"p": []string{pk}},
Since: &since,
},