Move chat message in js-waku

This commit is contained in:
Franck Royer 2021-05-04 11:11:14 +10:00
parent abbbd50512
commit 19d6459883
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 3 additions and 4 deletions

View File

@ -4,13 +4,12 @@ import util from 'util';
import TCP from 'libp2p-tcp'; import TCP from 'libp2p-tcp';
import { multiaddr, Multiaddr } from 'multiaddr'; import { multiaddr, Multiaddr } from 'multiaddr';
import { ChatMessage } from '../lib/chat_message';
import Waku from '../lib/waku'; import Waku from '../lib/waku';
import { WakuMessage } from '../lib/waku_message'; import { WakuMessage } from '../lib/waku_message';
import { RelayDefaultTopic } from '../lib/waku_relay'; import { RelayDefaultTopic } from '../lib/waku_relay';
import { StoreCodec } from '../lib/waku_store'; import { StoreCodec } from '../lib/waku_store';
import { ChatMessage } from './chat_message';
const ChatContentTopic = 'dingpu'; const ChatContentTopic = 'dingpu';
(async function (): Promise<void> { (async function (): Promise<void> {

View File

@ -1,7 +1,7 @@
import { expect } from 'chai'; import { expect } from 'chai';
import fc from 'fast-check'; import fc from 'fast-check';
import { ChatMessage } from './chat_message'; import { ChatMessage } from './index';
describe('Chat Message', function () { describe('Chat Message', function () {
it('Chat message round trip binary serialization', function () { it('Chat message round trip binary serialization', function () {

View File

@ -1,6 +1,6 @@
import { Reader } from 'protobufjs/minimal'; 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? // TODO: Move to waku library?
export class ChatMessage { export class ChatMessage {