Fix build
This commit is contained in:
parent
761c1feebd
commit
b6dc7d5dba
|
@ -9,7 +9,7 @@ export class Chat {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public createMessage(text: string) {
|
private createMessage(text: string) {
|
||||||
const { timestamp, clock } = this.nextClockAndTimestamp();
|
const { timestamp, clock } = this.nextClockAndTimestamp();
|
||||||
|
|
||||||
return ChatMessage.createMessage(clock, timestamp, text, this.id);
|
return ChatMessage.createMessage(clock, timestamp, text, this.id);
|
||||||
|
@ -33,7 +33,7 @@ export class Chat {
|
||||||
this.lastMessage = message;
|
this.lastMessage = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.lastClockValue < message.clock) {
|
if (!this.lastClockValue || this.lastClockValue < message.clock) {
|
||||||
this.lastClockValue = message.clock;
|
this.lastClockValue = message.clock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import * as proto from "./proto/communities/v2/chat_message";
|
import * as proto from "./proto/communities/v2/chat_message";
|
||||||
import {
|
import { ChatMessage_ContentType } from "./proto/communities/v2/chat_message";
|
||||||
AudioMessage,
|
|
||||||
ChatMessage_ContentType,
|
|
||||||
ImageMessage,
|
|
||||||
StickerMessage,
|
|
||||||
} from "./proto/communities/v2/chat_message";
|
|
||||||
import { MessageType } from "./proto/communities/v2/enums";
|
import { MessageType } from "./proto/communities/v2/enums";
|
||||||
|
|
||||||
export class ChatMessage {
|
export class ChatMessage {
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
|
||||||
"lib": ["es2017", "dom"],
|
"lib": ["es2017", "dom"],
|
||||||
"types": ["node", "mocha"],
|
|
||||||
"typeRoots": ["node_modules/@types", "src/types"]
|
"typeRoots": ["node_modules/@types", "src/types"]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts"],
|
"include": ["src/**/*.ts"],
|
||||||
|
|
Loading…
Reference in New Issue