use proper shse.pubkey
This commit is contained in:
parent
62ad921abb
commit
d2dd75de0f
|
@ -165,7 +165,7 @@ module.exports = class HubObserver {
|
|||
*/
|
||||
#notifyNewAttendant(attendantPubkey, hubPubkey, hubName) {
|
||||
if (attendantPubkey === hubPubkey) return
|
||||
if (attendantPubkey === this.#sstack.id) return
|
||||
if (attendantPubkey === this.#local.shse.pubkey) return
|
||||
const address = this.#getAddress(attendantPubkey)
|
||||
this.#local.hubClient._notifyDiscoveredAttendant({
|
||||
address,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// @ts-ignore
|
||||
const DuplexPair = require('pull-pair/duplex') // @ts-ignore
|
||||
const Notify = require('pull-notify')
|
||||
const bs58 = require('bs58')
|
||||
const debug = require('debug')('ppppp:hub-client')
|
||||
const makeTunnelPlugin = require('./ms-tunnel')
|
||||
const { ErrorDuplex } = require('./utils')
|
||||
|
@ -52,8 +51,7 @@ module.exports = {
|
|||
*/
|
||||
connect(origin) {
|
||||
// @ts-ignore
|
||||
// FIXME: this comes from secret-stack
|
||||
const hub = bs58.encode(Buffer.from(this.id, 'base64'))
|
||||
const hub = this.shse.pubkey
|
||||
debug('received hubClient.connect(%s) via hub %s', origin, hub)
|
||||
if (hubs.has(hub) && origin) {
|
||||
debug('connect() will resolve because handler exists')
|
||||
|
|
Loading…
Reference in New Issue