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