From 84d59ea460a602ba4513b38e7cd5d54e64a16da9 Mon Sep 17 00:00:00 2001 From: Kier Borromeo Date: Tue, 10 Dec 2024 16:22:19 +0800 Subject: [PATCH] fix: validation for tg/twitter --- src/agents/vito/echo.json | 22 +++++++++++----------- src/echo.schema.json | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/agents/vito/echo.json b/src/agents/vito/echo.json index 4394031..4edaf1d 100644 --- a/src/agents/vito/echo.json +++ b/src/agents/vito/echo.json @@ -1,17 +1,17 @@ { -"$schema": "../../echo.schema.json", -"creator": "Echos", -"echoToken": { + "$schema": "../../echo.schema.json", + "creator": "Echos", + "echoToken": { "symbol": "VITO", "address": "0xd5dca892ea2a53d7bd4439c75fdac8cfd45a62dc" -}, -"id": "0xc28dD2D473083557F6296D768C0036eD85228D36", -"metadata": { + }, + "id": "0xc28dD2D473083557F6296D768C0036eD85228D36", + "metadata": { "description": "digital fixer with gabagool roots // leave the gun, take the cannoli 🤌", "image": "bafybeihrlonv2vxdjvjblpffa4tciq4sj4p5gnowgh5h5oy6phkx374vg4", - "telegram": "", + "telegram": null, "twitter": "https://x.com/vito_him" -}, -"name": "Vito \"the Don\"", -"verified": true -} \ No newline at end of file + }, + "name": "Vito \"the Don\"", + "verified": true +} diff --git a/src/echo.schema.json b/src/echo.schema.json index d85453c..2270eac 100644 --- a/src/echo.schema.json +++ b/src/echo.schema.json @@ -29,7 +29,7 @@ }, "metadata": { "type": "object", - "required": ["description", "image"], + "required": ["description", "image", "telegram", "twitter"], "properties": { "description": { "type": "string", @@ -40,12 +40,12 @@ "description": "IPFS hash of the echo's image" }, "telegram": { - "type": "string", + "type": ["string", "null"], "description": "Telegram group URL", "pattern": "^https?:\\/\\/(?:t\\.me|telegram\\.me)\\/(?:[+])?[a-zA-Z0-9_]+$" }, "twitter": { - "type": "string", + "type": ["string", "null"], "description": "Twitter/X profile URL", "pattern": "^https?:\\/\\/(?:twitter\\.com|x\\.com)\\/[a-zA-Z0-9_]+$" }