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