Fix build

This commit is contained in:
Franck Royer 2021-09-14 14:09:09 +10:00
parent 761c1feebd
commit b6dc7d5dba
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 3 additions and 9 deletions

View File

@ -9,7 +9,7 @@ export class Chat {
this.id = id;
}
public createMessage(text: string) {
private createMessage(text: string) {
const { timestamp, clock } = this.nextClockAndTimestamp();
return ChatMessage.createMessage(clock, timestamp, text, this.id);
@ -33,7 +33,7 @@ export class Chat {
this.lastMessage = message;
}
if (this.lastClockValue < message.clock) {
if (!this.lastClockValue || this.lastClockValue < message.clock) {
this.lastClockValue = message.clock;
}
}

View File

@ -1,10 +1,5 @@
import * as proto from "./proto/communities/v2/chat_message";
import {
AudioMessage,
ChatMessage_ContentType,
ImageMessage,
StickerMessage,
} from "./proto/communities/v2/chat_message";
import { ChatMessage_ContentType } from "./proto/communities/v2/chat_message";
import { MessageType } from "./proto/communities/v2/enums";
export class ChatMessage {

View File

@ -38,7 +38,6 @@
"skipLibCheck": true,
"lib": ["es2017", "dom"],
"types": ["node", "mocha"],
"typeRoots": ["node_modules/@types", "src/types"]
},
"include": ["src/**/*.ts"],