Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Disallow net: invites #58

Merged
merged 2 commits into from
Jan 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ui/connections.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function () {
</div>
<h3>Connections</h3>
<div v-for="peer in peers">
<button class="clickButton" v-on:click="disconnect(peer)">Disconnect</button> from <router-link :to="{name: 'profile', params: { feedId: peer.data.key }}">{{ peer.data.key }}</router-link>
<button class="clickButton" v-on:click="disconnect(peer)">Disconnect</button> from <router-link :to="{name: 'profile', params: { feedId: peer.data.key }}">{{ peer.data.key }}</router-link>&nbsp;({{ peer.data.type }})<br />
</div>
<div id="status" v-html="statusHTML"></div>
</div>`,
Expand All @@ -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
Expand Down