*Convert more api methods to use _processOrQueueAction
This commit is contained in:
parent
b4e406b468
commit
701a3190ae
16
src/index.ts
16
src/index.ts
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue