nip29: bring back negative tags in edit-metadata.
This commit is contained in:
@@ -79,6 +79,7 @@ var moderationActionFactories = map[nostr.Kind]func(nostr.Event) (Action, error)
|
||||
ok := false
|
||||
edit := EditMetadata{When: evt.CreatedAt}
|
||||
y := true
|
||||
n := false
|
||||
|
||||
for _, tag := range evt.Tags {
|
||||
if len(tag) >= 1 {
|
||||
@@ -101,21 +102,39 @@ var moderationActionFactories = map[nostr.Kind]func(nostr.Event) (Action, error)
|
||||
case "closed":
|
||||
edit.ClosedValue = &y
|
||||
ok = true
|
||||
case "open":
|
||||
edit.ClosedValue = &n
|
||||
ok = true
|
||||
case "restricted":
|
||||
edit.RestrictedValue = &y
|
||||
ok = true
|
||||
case "unrestricted":
|
||||
edit.RestrictedValue = &n
|
||||
ok = true
|
||||
case "hidden":
|
||||
edit.HiddenValue = &y
|
||||
ok = true
|
||||
case "visible":
|
||||
edit.HiddenValue = &n
|
||||
ok = true
|
||||
case "private":
|
||||
edit.PrivateValue = &y
|
||||
ok = true
|
||||
case "public":
|
||||
edit.PrivateValue = &n
|
||||
ok = true
|
||||
case "no-text":
|
||||
edit.NoTextValue = &y
|
||||
ok = true
|
||||
case "text":
|
||||
edit.NoTextValue = &n
|
||||
ok = true
|
||||
case "livekit":
|
||||
edit.LivekitValue = &y
|
||||
ok = true
|
||||
case "no-livekit":
|
||||
edit.LivekitValue = &n
|
||||
ok = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user