From 2da4d0a86e0292fc2caf2c3d02a0428946e4afb9 Mon Sep 17 00:00:00 2001
From: Anna Puddles <113144806+annapuddles@users.noreply.github.com>
Date: Tue, 10 Jan 2023 12:07:25 -0500
Subject: [PATCH] Update template.lsl
---
template.lsl | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/template.lsl b/template.lsl
index 34b669a..3cec396 100644
--- a/template.lsl
+++ b/template.lsl
@@ -1,6 +1,6 @@
-json_link_message(integer link, string method, list params)
-{
- llMessageLinked(link, 0, llList2Json(JSON_OBJECT, ["method", method, "params", llList2Json(JSON_OBJECT, params)]), NULL_KEY);
+jsonrpc_link_notification(integer link, string method, string params_type, list params)
+{
+ llMessageLinked(link, 0, llList2Json(JSON_OBJECT, ["jsonrpc", "2.0", "method", method, "params", llList2Json(params_type, params)]), NULL_KEY);
}
default
@@ -16,7 +16,7 @@ default
string method = llJsonGetValue(str, ["params", "method"]);
string body = llJsonGetValue(str, ["params", "body"]);
- json_link_message(sender, "prim-dns:set-content-type", ["request-id", request_id, "content-type", CONTENT_TYPE_HTML]);
- json_link_message(sender, "prim-dns:response", ["request-id", request_id, "status", 200, "body", "Hello, world!"]);
+ jsonrpc_link_notification(sender, "prim-dns:set-content-type", JSON_OBJECT, ["request-id", request_id, "content-type", CONTENT_TYPE_HTML]);
+ jsonrpc_link_notification(sender, "prim-dns:response", JSON_OBJECT, ["request-id", request_id, "status", 200, "body", "Hello, world!"]);
}
}