*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 = [];
}
public join(topic: Uint8Array, opts = {}) {
return this._activeRelay?.join(topic, opts);
public join(topic: Uint8Array, opts = {}): void {
return this._processOrQueueAction("join", ...arguments);
}
public joinPeer(publicKey: Uint8Array) {
return this._activeRelay?.joinPeer(publicKey);
public joinPeer(publicKey: Uint8Array): void {
return this._processOrQueueAction("joinPeer", ...arguments);
}
public leave(topic: Uint8Array) {
return this._activeRelay?.leave(topic);
public leave(topic: Uint8Array): void {
return this._processOrQueueAction("leave", ...arguments);
}
public leavePeer(publicKey: Uint8Array) {
return this._activeRelay?.leavePeer(publicKey);
public leavePeer(publicKey: Uint8Array): void {
return this._processOrQueueAction("leavePeer", ...arguments);
}
public status(publicKey: Uint8Array) {
return this._activeRelay?.status(publicKey);