mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-19 15:24:22 +01:00
enforce kind when loading naddr with a specified kind.
This commit is contained in:
3
nostr.go
3
nostr.go
@@ -98,6 +98,9 @@ func getEvent(ctx context.Context, code string) (*nostr.Event, error) {
|
|||||||
filter.Tags = nostr.TagMap{
|
filter.Tags = nostr.TagMap{
|
||||||
"d": []string{v.Identifier},
|
"d": []string{v.Identifier},
|
||||||
}
|
}
|
||||||
|
if v.Kind != 0 {
|
||||||
|
filter.Kinds = append(filter.Kinds, v.Kind)
|
||||||
|
}
|
||||||
relays = append(relays, getRelay())
|
relays = append(relays, getRelay())
|
||||||
relays = append(relays, getRelay())
|
relays = append(relays, getRelay())
|
||||||
relays = append(relays, v.Relays...)
|
relays = append(relays, v.Relays...)
|
||||||
|
|||||||
@@ -235,8 +235,7 @@ func render(w http.ResponseWriter, r *http.Request) {
|
|||||||
typ = "telegram_instant_view"
|
typ = "telegram_instant_view"
|
||||||
useTextImage = false
|
useTextImage = false
|
||||||
}
|
}
|
||||||
}
|
} else if style == "slack" || style == "discord" {
|
||||||
if style == "slack" || style == "discord" {
|
|
||||||
useTextImage = false
|
useTextImage = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user