ITADN

Edits in event_policy.go for moderation range and "h" tag

#2Opencryptographichistory 创建于 2024-01-16
In event_policy.go, it seems like there are two places that required edits to add users etc: 1) restrictInvalidModerationActions() is being tested for all events? I may be misinterpreting, but this seems to work better bypassing the tests for non-moderation actions like this: ``` func restrictInvalidModerationActions(ctx context.Context, event *nostr.Event) (reject bool, msg string) { if !(event.Kind >= 9000 && event.Kind <= 9006) { // is it a broader range of Kinds to bypass? return false, "" // it's not a moderation action } ``` 2) Also, it seems during the flow of a Join request, when the user is being added automatically, relay29 is looking for an "h" tag like in: reactToJoinRequest(ctx context.Context, event *nostr.Event) {} Seemed like relay29 was happier after adding in an "h" tag like this: Tags: nostr.Tags{ nostr.Tag{"h", group.ID}, nostr.Tag{"p", event.PubKey}, }, I'm still working through it, so I may have misinterpreted. But hope this is a step forward? Thanks.
1 条评论