From e467cf137946ec7c6e640e7a2199e1bac59cce87 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 23 Apr 2021 14:56:18 +1000 Subject: [PATCH] Add /info command --- web-chat/src/App.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web-chat/src/App.tsx b/web-chat/src/App.tsx index b7ba0ad8a9..3d730e393d 100644 --- a/web-chat/src/App.tsx +++ b/web-chat/src/App.tsx @@ -82,6 +82,7 @@ export default function App() { switch (cmd) { case '/help': commandResponses.push('/nick : set a new nickname'); + commandResponses.push('/info: some information about the node'); commandResponses.push( '/connect : connect to the given peer' ); @@ -96,6 +97,15 @@ export default function App() { commandResponses.push(`New nick: ${arg}`); } break; + case '/info': + if (!stateWaku) { + commandResponses.push(`Waku node is starting`); + } else { + commandResponses.push( + `PeerId: ${stateWaku.libp2p.peerId.toB58String()}` + ); + } + break; case '/connect': const peer = args.shift(); if (!peer) {