Compare commits
2 Commits
bbbe813360
...
ee3e71351c
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | ee3e71351c | |
Derrick Hammer | 7028609da4 |
|
@ -76,7 +76,7 @@ export class SwarmClient extends Client {
|
||||||
}
|
}
|
||||||
async join(topic) {
|
async join(topic) {
|
||||||
if (typeof topic === "string") {
|
if (typeof topic === "string") {
|
||||||
topic = blake2b(topic);
|
topic = blake2b(topic, { dkLen: 32 });
|
||||||
}
|
}
|
||||||
this._topics.add(topic);
|
this._topics.add(topic);
|
||||||
this.callModule("join", { id: this.id, topic });
|
this.callModule("join", { id: this.id, topic });
|
||||||
|
|
|
@ -106,7 +106,7 @@ export class SwarmClient extends Client {
|
||||||
|
|
||||||
public async join(topic: Buffer | Uint8Array | string): Promise<void> {
|
public async join(topic: Buffer | Uint8Array | string): Promise<void> {
|
||||||
if (typeof topic === "string") {
|
if (typeof topic === "string") {
|
||||||
topic = blake2b(topic);
|
topic = blake2b(topic, { dkLen: 32 });
|
||||||
}
|
}
|
||||||
|
|
||||||
this._topics.add(topic);
|
this._topics.add(topic);
|
||||||
|
|
Loading…
Reference in New Issue