Move proto wrappers in wire folder
This commit is contained in:
parent
738609d53f
commit
5d04f731a7
|
@ -1,6 +1,6 @@
|
|||
import { ChatMessage, Content } from "./chat_message";
|
||||
import { chatIdToContentTopic } from "./contentTopic";
|
||||
import { createSymKeyFromPassword } from "./encryption";
|
||||
import { ChatMessage, Content } from "./wire/chat_message";
|
||||
|
||||
/**
|
||||
* Represent a chat room. Only public chats are currently supported.
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { expect } from "chai";
|
||||
|
||||
import {
|
||||
AudioMessage_AudioType,
|
||||
ChatMessage_ContentType,
|
||||
} from "./proto/communities/v1/chat_message";
|
||||
import { ImageType } from "./proto/communities/v1/enums";
|
||||
import {
|
||||
AudioContent,
|
||||
ChatMessage,
|
||||
ContentType,
|
||||
ImageContent,
|
||||
StickerContent,
|
||||
} from "./chat_message";
|
||||
import {
|
||||
AudioMessage_AudioType,
|
||||
ChatMessage_ContentType,
|
||||
} from "./proto/communities/v1/chat_message";
|
||||
import { ImageType } from "./proto/communities/v1/enums";
|
||||
} from "./wire/chat_message";
|
||||
|
||||
describe("Chat Message", () => {
|
||||
it("Encode & decode Image message", () => {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { Identity } from "./identity";
|
||||
import { Messenger } from "./messenger";
|
||||
export { Messenger, Identity };
|
||||
import { ApplicationMetadataMessage } from "./wire/application_metadata_message";
|
||||
import { ChatMessage } from "./wire/chat_message";
|
||||
|
||||
export { Messenger, Identity, ApplicationMetadataMessage, ChatMessage };
|
||||
|
|
|
@ -2,10 +2,10 @@ import { expect } from "chai";
|
|||
import debug from "debug";
|
||||
import { utils } from "js-waku";
|
||||
|
||||
import { ApplicationMetadataMessage } from "./application_metadata_message";
|
||||
import { ContentType } from "./chat_message";
|
||||
import { Identity } from "./identity";
|
||||
import { Messenger } from "./messenger";
|
||||
import { ApplicationMetadataMessage } from "./wire/application_metadata_message";
|
||||
import { ContentType } from "./wire/chat_message";
|
||||
|
||||
const testChatId = "test-chat-id";
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@ import debug from "debug";
|
|||
import { Waku, WakuMessage } from "js-waku";
|
||||
import { CreateOptions as WakuCreateOptions } from "js-waku/build/main/lib/waku";
|
||||
|
||||
import { ApplicationMetadataMessage } from "./application_metadata_message";
|
||||
import { Chat } from "./chat";
|
||||
import { ChatMessage, Content } from "./chat_message";
|
||||
import { Identity } from "./identity";
|
||||
import { ApplicationMetadataMessage_Type } from "./proto/status/v1/application_metadata_message";
|
||||
import { ApplicationMetadataMessage } from "./wire/application_metadata_message";
|
||||
import { ChatMessage, Content } from "./wire/chat_message";
|
||||
|
||||
const dbg = debug("communities:messenger");
|
||||
|
||||
|
|
|
@ -3,10 +3,11 @@ import { utils } from "js-waku";
|
|||
import { Reader } from "protobufjs";
|
||||
import secp256k1 from "secp256k1";
|
||||
|
||||
import { Identity } from "../identity";
|
||||
import * as proto from "../proto/status/v1/application_metadata_message";
|
||||
import { ApplicationMetadataMessage_Type } from "../proto/status/v1/application_metadata_message";
|
||||
|
||||
import { ChatMessage } from "./chat_message";
|
||||
import { Identity } from "./identity";
|
||||
import * as proto from "./proto/status/v1/application_metadata_message";
|
||||
import { ApplicationMetadataMessage_Type } from "./proto/status/v1/application_metadata_message";
|
||||
|
||||
export class ApplicationMetadataMessage {
|
||||
private constructor(public proto: proto.ApplicationMetadataMessage) {}
|
|
@ -1,14 +1,14 @@
|
|||
import { Reader } from "protobufjs";
|
||||
|
||||
import * as proto from "./proto/communities/v1/chat_message";
|
||||
import * as proto from "../proto/communities/v1/chat_message";
|
||||
import {
|
||||
AudioMessage,
|
||||
AudioMessage_AudioType,
|
||||
ChatMessage_ContentType,
|
||||
ImageMessage,
|
||||
StickerMessage,
|
||||
} from "./proto/communities/v1/chat_message";
|
||||
import { ImageType, MessageType } from "./proto/communities/v1/enums";
|
||||
} from "../proto/communities/v1/chat_message";
|
||||
import { ImageType, MessageType } from "../proto/communities/v1/enums";
|
||||
|
||||
export type Content =
|
||||
| TextContent
|
Loading…
Reference in New Issue