Only create chat if 1-1 call, it should already exist in conference if available
add me in chatroom participants view #LINQT-2312 update admin status on conference joined #LINQT-2311 fix composing status when user starts writing message #LINQT-2317 do not force presence if disabled in account params #LINQT-2318 fix chat uin 1-1 call #LINQT-2322
This commit is contained in:
parent
f2f29a0d7c
commit
12c12ad2b5
9 changed files with 558 additions and 570 deletions
|
|
@ -198,7 +198,11 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
||||||
emit conferenceJoined();
|
emit conferenceJoined();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
mChatModelConnection->invokeToCore([this, participants]() { setParticipants(participants); });
|
auto meAdmin = chatRoom->getMe() && chatRoom->getMe()->isAdmin();
|
||||||
|
mChatModelConnection->invokeToCore([this, participants, meAdmin]() {
|
||||||
|
setParticipants(participants);
|
||||||
|
setMeAdmin(meAdmin);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Events (excluding messages)
|
// Events (excluding messages)
|
||||||
|
|
@ -621,6 +625,8 @@ ChatCore::buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom)
|
||||||
auto participantCore = ParticipantCore::create(participant);
|
auto participantCore = ParticipantCore::create(participant);
|
||||||
result.append(participantCore);
|
result.append(participantCore);
|
||||||
}
|
}
|
||||||
|
auto meCore = ParticipantCore::create(chatRoom->getMe());
|
||||||
|
if (meCore) result.append(meCore);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -566,12 +566,6 @@ void AccountModel::setPresence(LinphoneEnums::Presence presence,
|
||||||
core->getConfig()->setString(accountSection, "presence_note", Utils::appStringToCoreString(presenceNote));
|
core->getConfig()->setString(accountSection, "presence_note", Utils::appStringToCoreString(presenceNote));
|
||||||
core->getConfig()->sync();
|
core->getConfig()->sync();
|
||||||
|
|
||||||
if (!mMonitor->getParams()->publishEnabled()) {
|
|
||||||
auto params = mMonitor->getParams()->clone();
|
|
||||||
params->enablePublish(true);
|
|
||||||
mMonitor->setParams(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto presenceModel = ToolModel::appPresenceToCorePresenceModel(presence, presenceNote);
|
auto presenceModel = ToolModel::appPresenceToCorePresenceModel(presence, presenceNote);
|
||||||
core->setPresenceModel(presenceModel); // No api (yet) at the account level
|
core->setPresenceModel(presenceModel); // No api (yet) at the account level
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1589,8 +1589,11 @@ VariantObject *Utils::getCurrentCallChat(CallGui *call) {
|
||||||
auto chatCore = ChatCore::create(linphoneChatRoom);
|
auto chatCore = ChatCore::create(linphoneChatRoom);
|
||||||
return QVariant::fromValue(new ChatGui(chatCore));
|
return QVariant::fromValue(new ChatGui(chatCore));
|
||||||
} else {
|
} else {
|
||||||
lInfo() << "[Utils] Did not find existing chat room, create one";
|
// Only try to create chatroom if 1-1 call
|
||||||
linphoneChatRoom = ToolModel::createCurrentCallChat(callModel);
|
if (!callModel->getConference()) {
|
||||||
|
lInfo() << "[Utils] Did not find existing chat room, create one";
|
||||||
|
linphoneChatRoom = ToolModel::createCurrentCallChat(callModel);
|
||||||
|
}
|
||||||
if (linphoneChatRoom != nullptr) {
|
if (linphoneChatRoom != nullptr) {
|
||||||
lInfo() << "[Utils] Chatroom created with" << callModel->getRemoteAddress()->asStringUriOnly();
|
lInfo() << "[Utils] Chatroom created with" << callModel->getRemoteAddress()->asStringUriOnly();
|
||||||
auto id = linphoneChatRoom->getIdentifier();
|
auto id = linphoneChatRoom->getIdentifier();
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ FocusScope {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(49)
|
Layout.preferredHeight: Utils.getSizeWithScreenRatio(49)
|
||||||
focus: true
|
focus: true
|
||||||
|
isError: groupNameItem.errorMessage !== ""
|
||||||
KeyNavigation.down: addParticipantsLayout //participantList.count > 0 ? participantList : searchbar
|
KeyNavigation.down: addParticipantsLayout //participantList.count > 0 ? participantList : searchbar
|
||||||
Accessible.name: qsTr("group_start_dialog_subject_hint")
|
Accessible.name: qsTr("group_start_dialog_subject_hint")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -506,7 +506,7 @@ FocusScope {
|
||||||
if (chat) messageSender.text = mainItem.chat.core.sendingText
|
if (chat) messageSender.text = mainItem.chat.core.sendingText
|
||||||
}
|
}
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (text !== "" && mainItem.chat.core.composingName !== "") {
|
if (text !== "") {
|
||||||
mainItem.chat.core.lCompose()
|
mainItem.chat.core.lCompose()
|
||||||
}
|
}
|
||||||
var lastChar = text.slice(-1)
|
var lastChar = text.slice(-1)
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ AbstractWindow {
|
||||||
zrtpValidation.open()
|
zrtpValidation.open()
|
||||||
}
|
}
|
||||||
} else if (callState === LinphoneEnums.CallState.StreamsRunning) {
|
} else if (callState === LinphoneEnums.CallState.StreamsRunning) {
|
||||||
if (!mainWindow.chat && mainWindow.conference.core.isChatEnabled)
|
if (!mainWindow.chat && (!mainWindow.conference || mainWindow.conference.core.isChatEnabled))
|
||||||
mainWindow.chatObj = UtilsCpp.getCurrentCallChat(mainWindow.call)
|
mainWindow.chatObj = UtilsCpp.getCurrentCallChat(mainWindow.call)
|
||||||
} else if (callState === LinphoneEnums.CallState.Error
|
} else if (callState === LinphoneEnums.CallState.Error
|
||||||
|| callState === LinphoneEnums.CallState.End) {
|
|| callState === LinphoneEnums.CallState.End) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue