From 418cfac0e379eae9796faede986522be8d86fe4e Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 14 Mar 2024 00:42:47 +0000 Subject: [PATCH] Add a stock app with local room connection info. #15 --- apps/room.json | 5 +++++ apps/room/app.js | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 apps/room.json create mode 100644 apps/room/app.js diff --git a/apps/room.json b/apps/room.json new file mode 100644 index 00000000..62ec0314 --- /dev/null +++ b/apps/room.json @@ -0,0 +1,5 @@ +{ + "type": "tildefriends-app", + "emoji": "📦", + "previous": "&IU+TwyM7TznD8NBfnw7tgW2zxVlMqTVxSqWFjuosLwo=.sha256" +} diff --git a/apps/room/app.js b/apps/room/app.js new file mode 100644 index 00000000..1beefe22 --- /dev/null +++ b/apps/room/app.js @@ -0,0 +1,13 @@ +async function main() { + let host = core.url.match(/.*\/\/(.*?)\//)[1]; + let id = (await ssb.getServerIdentity()).substring(1); + let room = `net:${host}:${ssb.port}~shs:${id}:SSB+Room+SK3TLYC2T86EHQCUHBUHASCASE18JBV24=`; + await app.setDocument(` + +

Server

+
The local server address is:
+
+ + `); +} +main(); \ No newline at end of file