fix js-waku imports
This commit is contained in:
parent
5069563f1f
commit
7448ed1536
|
@ -1,5 +1,4 @@
|
||||||
import { WakuMessage } from 'js-waku'
|
import { waku_message, WakuMessage } from 'js-waku'
|
||||||
import { DecryptionMethod } from 'js-waku/build/main/lib/waku_message'
|
|
||||||
|
|
||||||
import { ChatMessage } from '.'
|
import { ChatMessage } from '.'
|
||||||
import { createSymKeyFromPassword } from './encryption'
|
import { createSymKeyFromPassword } from './encryption'
|
||||||
|
@ -260,7 +259,7 @@ export class GroupChats {
|
||||||
chat.members.map(async member => {
|
chat.members.map(async member => {
|
||||||
if (!removeObserver) {
|
if (!removeObserver) {
|
||||||
this.waku.relay.addDecryptionKey(member.symKey, {
|
this.waku.relay.addDecryptionKey(member.symKey, {
|
||||||
method: DecryptionMethod.Symmetric,
|
method: waku_message.DecryptionMethod.Symmetric,
|
||||||
contentTopics: [member.topic],
|
contentTopics: [member.topic],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
import debug from 'debug'
|
import debug from 'debug'
|
||||||
import { Protocols } from 'js-waku/build/main/lib/waku'
|
import { Protocols } from 'js-waku'
|
||||||
|
|
||||||
import { Community } from './community'
|
import { Community } from './community'
|
||||||
import { Identity } from './identity'
|
import { Identity } from './identity'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import debug from 'debug'
|
import debug from 'debug'
|
||||||
import { Waku, WakuMessage } from 'js-waku'
|
import { Waku, waku_message, WakuMessage } from 'js-waku'
|
||||||
import { DecryptionMethod } from 'js-waku/build/main/lib/waku_message'
|
|
||||||
|
|
||||||
import { Chat } from './chat'
|
import { Chat } from './chat'
|
||||||
import { ApplicationMetadataMessage_Type } from './proto/status/v1/application_metadata_message'
|
import { ApplicationMetadataMessage_Type } from './proto/status/v1/application_metadata_message'
|
||||||
|
@ -10,7 +9,7 @@ import { ChatMessage } from './wire/chat_message'
|
||||||
|
|
||||||
import type { Identity } from './identity'
|
import type { Identity } from './identity'
|
||||||
import type { Content } from './wire/chat_message'
|
import type { Content } from './wire/chat_message'
|
||||||
import type { CreateOptions as WakuCreateOptions } from 'js-waku/build/main/lib/waku'
|
import type { waku } from 'js-waku'
|
||||||
|
|
||||||
const dbg = debug('communities:messenger')
|
const dbg = debug('communities:messenger')
|
||||||
|
|
||||||
|
@ -37,7 +36,7 @@ export class Messenger {
|
||||||
|
|
||||||
public static async create(
|
public static async create(
|
||||||
identity: Identity | undefined,
|
identity: Identity | undefined,
|
||||||
wakuOptions?: WakuCreateOptions
|
wakuOptions?: waku.CreateOptions
|
||||||
): Promise<Messenger> {
|
): Promise<Messenger> {
|
||||||
const _wakuOptions = Object.assign(
|
const _wakuOptions = Object.assign(
|
||||||
{ bootstrap: { default: true } },
|
{ bootstrap: { default: true } },
|
||||||
|
@ -83,7 +82,7 @@ export class Messenger {
|
||||||
throw `Failed to join chat, it is already joined: ${chat.id}`
|
throw `Failed to join chat, it is already joined: ${chat.id}`
|
||||||
|
|
||||||
this.waku.addDecryptionKey(chat.symKey, {
|
this.waku.addDecryptionKey(chat.symKey, {
|
||||||
method: DecryptionMethod.Symmetric,
|
method: waku_message.DecryptionMethod.Symmetric,
|
||||||
contentTopics: [chat.contentTopic],
|
contentTopics: [chat.contentTopic],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue