adapt to FetchSpecificEvent() changes.

This commit is contained in:
fiatjaf
2025-02-17 16:54:31 -03:00
parent 26930d40bc
commit faca2e50f0
2 changed files with 10 additions and 4 deletions

7
mcp.go
View File

@@ -6,11 +6,12 @@ import (
"os"
"strings"
"github.com/urfave/cli/v3"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip19"
"github.com/nbd-wtf/go-nostr/sdk"
"github.com/urfave/cli/v3"
)
var mcpServer = &cli.Command{
@@ -139,7 +140,9 @@ var mcpServer = &cli.Command{
pm.ShortName(), pm.PubKey),
), nil
case "nevent":
event, _, err := sys.FetchSpecificEventFromInput(ctx, uri, false)
event, _, err := sys.FetchSpecificEventFromInput(ctx, uri, sdk.FetchSpecificEventParameters{
WithRelays: false,
})
if err != nil {
return mcp.NewToolResultError("Couldn't find this event anywhere"), nil
}