mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-15 16:50:16 +01:00
remove .Author field from filter.
This commit is contained in:
@@ -4,7 +4,6 @@ import "github.com/fiatjaf/go-nostr/event"
|
|||||||
|
|
||||||
type EventFilter struct {
|
type EventFilter struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
Author string `json:"author,omitempty"`
|
|
||||||
Kind *int `json:"kind,omitempty"`
|
Kind *int `json:"kind,omitempty"`
|
||||||
Authors []string `json:"authors,omitempty"`
|
Authors []string `json:"authors,omitempty"`
|
||||||
TagEvent string `json:"#e,omitempty"`
|
TagEvent string `json:"#e,omitempty"`
|
||||||
@@ -21,10 +20,6 @@ func (ef EventFilter) Matches(event *event.Event) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if ef.Author != "" && ef.Author != event.PubKey {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if ef.Authors != nil {
|
if ef.Authors != nil {
|
||||||
found := false
|
found := false
|
||||||
for _, pubkey := range ef.Authors {
|
for _, pubkey := range ef.Authors {
|
||||||
|
|||||||
Reference in New Issue
Block a user