fix(@desktop/chat): show message which was sent during group chat creation

This commit is contained in:
mprakhov 2023-01-09 23:13:08 +02:00 committed by Mykhailo Prakhov
parent 5e8f3e6565
commit 3994f8b2fb
4 changed files with 8 additions and 5 deletions

View File

@ -100,8 +100,9 @@ QtObject {
return msg
}
function sendMessage(event, text, replyMessageId, fileUrlsAndSources) {
var chatContentModule = currentChatContentModule()
function sendMessage(chatId, event, text, replyMessageId, fileUrlsAndSources) {
chatCommunitySectionModule.prepareChatContentModuleForChatId(chatId)
const chatContentModule = chatCommunitySectionModule.getChatContentModule()
if (fileUrlsAndSources.length > 0){
chatContentModule.inputAreaModule.sendImages(JSON.stringify(fileUrlsAndSources));
}

View File

@ -90,7 +90,8 @@ Item {
else if (root.rootStore.createChatInitMessage !== "" ||
root.rootStore.createChatFileUrls.length > 0) {
root.rootStore.sendMessage(Qt.Key_Enter,
root.rootStore.sendMessage(chatId,
Qt.Key_Enter,
root.rootStore.createChatInitMessage,
"",
root.rootStore.createChatFileUrls

View File

@ -236,7 +236,8 @@ ColumnLayout {
return
}
if(root.rootStore.sendMessage(event,
if(root.rootStore.sendMessage(chatContentModule.getMyChatId(),
event,
chatInput.getTextWithPublicKeys(),
chatInput.isReply? chatInput.replyMessageId : "",
chatInput.fileUrlsAndSources

View File

@ -25,7 +25,7 @@ Page {
function createChat() {
root.rootStore.createChatInitMessage = chatInput.textInput.text
root.rootStore.createChatFileUrls = chatInput.fileUrls
root.rootStore.createChatFileUrls = chatInput.fileUrlsAndSources
membersSelector.createChat()
membersSelector.cleanup()