add hub.metadata() RPC as a placeholder for now

This commit is contained in:
Andre Staltz 2023-07-10 16:44:51 +03:00
parent 9998885daf
commit c6003d42bf
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 7 additions and 2 deletions

View File

@ -23,12 +23,13 @@ module.exports = {
manifest: { manifest: {
createTunnel: 'duplex', createTunnel: 'duplex',
ping: 'sync', ping: 'sync',
metadata: 'async',
attendants: 'source', attendants: 'source',
createToken: 'sync', createToken: 'sync',
}, },
permissions: { permissions: {
anonymous: { anonymous: {
allow: ['createTunnel', 'ping', 'attendants', 'createToken'], allow: ['createTunnel', 'ping', 'metadata', 'attendants', 'createToken'],
}, },
}, },
init(sstack, config) { init(sstack, config) {
@ -93,6 +94,10 @@ module.exports = {
return cat([initial, notifyAttendants.listen()]) return cat([initial, notifyAttendants.listen()])
}, },
metadata(cb) {
cb(null, { name: '' })
},
createTunnel(target) { createTunnel(target) {
if (attendants.has(target)) { if (attendants.has(target)) {
// prettier-ignore // prettier-ignore