From ecbacc9be38523afe2e9796e2039e104ce7eea9e Mon Sep 17 00:00:00 2001 From: Kyle Maas Date: Sun, 17 Jan 2021 16:15:41 -0500 Subject: [PATCH 1/2] Display the type of each connection --- ui/connections.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/connections.js b/ui/connections.js index 71a6631..fc18068 100644 --- a/ui/connections.js +++ b/ui/connections.js @@ -21,7 +21,7 @@ module.exports = function () {

Connections

- from {{ peer.data.key }} + from {{ peer.data.key }} ({{ peer.data.type }})
`, From 9632da12b91ec3d2498ac222da289ac90830c77a Mon Sep 17 00:00:00 2001 From: Kyle Maas Date: Sun, 17 Jan 2021 16:21:05 -0500 Subject: [PATCH 2/2] Add error message for unsupported invite codes --- ui/connections.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/connections.js b/ui/connections.js index fc18068..03d249f 100644 --- a/ui/connections.js +++ b/ui/connections.js @@ -48,6 +48,10 @@ module.exports = function () { add: function() { var s = this.address.split(":") + if (s[0] != 'ws' && s[0] != 'wss' && s[0] != 'dht' && s[0] != 'bt') { + alert("This SSB client does support connections of type '" + s[0] + "'.\n\nUnfortunately, browsers place a lot of restrictions on how we can connect. Most communications have to be done over WebSockets, and the invite code you're using doesn't appear to support them. Sorry!") + return + } SSB.net.connectAndRemember(this.address, { key: '@' + s[s.length-1] + '.ed25519', type: this.type