*Convert more api methods to use _processOrQueueAction

This commit is contained in:
Derrick Hammer 2023-02-05 14:02:53 -05:00
parent b4e406b468
commit 701a3190ae
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 8 additions and 8 deletions

View File

@ -198,17 +198,17 @@ export default class HyperswarmWeb extends EventEmitter {
this._queuedEmActions = []; this._queuedEmActions = [];
} }
public join(topic: Uint8Array, opts = {}) { public join(topic: Uint8Array, opts = {}): void {
return this._activeRelay?.join(topic, opts); return this._processOrQueueAction("join", ...arguments);
} }
public joinPeer(publicKey: Uint8Array) { public joinPeer(publicKey: Uint8Array): void {
return this._activeRelay?.joinPeer(publicKey); return this._processOrQueueAction("joinPeer", ...arguments);
} }
public leave(topic: Uint8Array) { public leave(topic: Uint8Array): void {
return this._activeRelay?.leave(topic); return this._processOrQueueAction("leave", ...arguments);
} }
public leavePeer(publicKey: Uint8Array) { public leavePeer(publicKey: Uint8Array): void {
return this._activeRelay?.leavePeer(publicKey); return this._processOrQueueAction("leavePeer", ...arguments);
} }
public status(publicKey: Uint8Array) { public status(publicKey: Uint8Array) {
return this._activeRelay?.status(publicKey); return this._activeRelay?.status(publicKey);