Upgrade nostrlib

This commit is contained in:
Jon Staab
2025-11-04 16:23:25 -08:00
parent fa9a7d07f3
commit 0f2fe72172
4 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -245,7 +245,7 @@ func (instance *Instance) OnConnect(ctx context.Context) {
khatru.RequestAuth(ctx)
}
func (instance *Instance) PreventBroadcast(ws *khatru.WebSocket, event nostr.Event) bool {
func (instance *Instance) PreventBroadcast(ws *khatru.WebSocket, filter nostr.Filter, event nostr.Event) bool {
return instance.IsWriteOnlyEvent(event)
}
+6 -4
View File
@@ -31,10 +31,12 @@ type ManagementStore struct {
func (m *ManagementStore) GetBannedEventItems() []nip86.IDReason {
items := make([]nip86.IDReason, 0)
for tag := range m.Events.GetOrCreateApplicationSpecificData(BANNED_EVENTS).Tags.FindAll("event") {
items = append(items, nip86.IDReason{
ID: tag[1],
Reason: tag[2],
})
if id, err := nostr.IDFromHex(tag[1]); err == nil {
items = append(items, nip86.IDReason{
ID: id,
Reason: tag[2],
})
}
}
return items