diff --git a/src/chat/index.ts b/src/chat/index.ts index f3a46627ab..8aa9b7863f 100644 --- a/src/chat/index.ts +++ b/src/chat/index.ts @@ -4,13 +4,12 @@ import util from 'util'; import TCP from 'libp2p-tcp'; import { multiaddr, Multiaddr } from 'multiaddr'; +import { ChatMessage } from '../lib/chat_message'; import Waku from '../lib/waku'; import { WakuMessage } from '../lib/waku_message'; import { RelayDefaultTopic } from '../lib/waku_relay'; import { StoreCodec } from '../lib/waku_store'; -import { ChatMessage } from './chat_message'; - const ChatContentTopic = 'dingpu'; (async function (): Promise { diff --git a/src/chat/chat_message.spec.ts b/src/lib/chat_message/index.spec.ts similarity index 94% rename from src/chat/chat_message.spec.ts rename to src/lib/chat_message/index.spec.ts index a33d08c22c..58a34dcb70 100644 --- a/src/chat/chat_message.spec.ts +++ b/src/lib/chat_message/index.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import fc from 'fast-check'; -import { ChatMessage } from './chat_message'; +import { ChatMessage } from './index'; describe('Chat Message', function () { it('Chat message round trip binary serialization', function () { diff --git a/src/chat/chat_message.ts b/src/lib/chat_message/index.ts similarity index 92% rename from src/chat/chat_message.ts rename to src/lib/chat_message/index.ts index b534b87ce3..db44448cb2 100644 --- a/src/chat/chat_message.ts +++ b/src/lib/chat_message/index.ts @@ -1,6 +1,6 @@ import { Reader } from 'protobufjs/minimal'; -import { ChatMessageProto } from '../proto/chat/v2/chat_message'; +import { ChatMessageProto } from '../../proto/chat/v2/chat_message'; // TODO: Move to waku library? export class ChatMessage {