mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-10-30 01:26:32 +00:00
19 lines
547 B
Go
19 lines
547 B
Go
package kinds
|
|
|
|
import (
|
|
"context"
|
|
"grain/relay/handlers/response"
|
|
relay "grain/relay/types"
|
|
|
|
"go.mongodb.org/mongo-driver/mongo"
|
|
"golang.org/x/net/websocket"
|
|
)
|
|
|
|
func HandleUnknownKind(ctx context.Context, evt relay.Event, collection *mongo.Collection, ws *websocket.Conn) error {
|
|
// Respond with an OK message indicating the event is not accepted
|
|
response.SendOK(ws, evt.ID, false, "invalid: kind is outside the ranges defined in NIP01")
|
|
|
|
// Return nil as there's no error in the process, just that the event is not accepted
|
|
return nil
|
|
}
|