fix bug with resending messages being encrypted twice
This commit is contained in:
Vendored
+6
-3
@@ -462,13 +462,16 @@
|
|||||||
// messages
|
// messages
|
||||||
sendNewMessage = async () => {
|
sendNewMessage = async () => {
|
||||||
if (this.cannotSendMessage.value == true) return;
|
if (this.cannotSendMessage.value == true) return;
|
||||||
const message = await this.createMessage(this.composingMessage.value);
|
await this.sendMessageText(this.composingMessage.value);
|
||||||
this.sendExistingMessage(message);
|
|
||||||
this.composingMessage.value = "";
|
this.composingMessage.value = "";
|
||||||
};
|
};
|
||||||
|
sendMessageText = async (text) => {
|
||||||
|
const message = await this.createMessage(text);
|
||||||
|
this.sendExistingMessage(message);
|
||||||
|
};
|
||||||
resendMessage = (message) => {
|
resendMessage = (message) => {
|
||||||
if (this.cannotResendMessage.value == true) return;
|
if (this.cannotResendMessage.value == true) return;
|
||||||
this.sendExistingMessage(message);
|
this.sendMessageText(message.body);
|
||||||
};
|
};
|
||||||
createMessage = async (messageText) => {
|
createMessage = async (messageText) => {
|
||||||
const secondaryChannelNames = [
|
const secondaryChannelNames = [
|
||||||
|
|||||||
@@ -159,14 +159,18 @@ export class Chat {
|
|||||||
sendNewMessage = async (): Promise<void> => {
|
sendNewMessage = async (): Promise<void> => {
|
||||||
if (this.cannotSendMessage.value == true) return;
|
if (this.cannotSendMessage.value == true) return;
|
||||||
|
|
||||||
const message = await this.createMessage(this.composingMessage.value);
|
await this.sendMessageText(this.composingMessage.value);
|
||||||
this.sendExistingMessage(message);
|
|
||||||
this.composingMessage.value = "";
|
this.composingMessage.value = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sendMessageText = async (text: string): Promise<void> => {
|
||||||
|
const message = await this.createMessage(text);
|
||||||
|
this.sendExistingMessage(message);
|
||||||
|
};
|
||||||
|
|
||||||
resendMessage = (message: ChatMessage) => {
|
resendMessage = (message: ChatMessage) => {
|
||||||
if (this.cannotResendMessage.value == true) return;
|
if (this.cannotResendMessage.value == true) return;
|
||||||
this.sendExistingMessage(message);
|
this.sendMessageText(message.body);
|
||||||
};
|
};
|
||||||
|
|
||||||
createMessage = async (messageText: string): Promise<ChatMessage> => {
|
createMessage = async (messageText: string): Promise<ChatMessage> => {
|
||||||
|
|||||||
Reference in New Issue
Block a user