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();
|
||||
});
|
||||
}
|
||||
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)
|
||||
|
|
@ -621,6 +625,8 @@ ChatCore::buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom)
|
|||
auto participantCore = ParticipantCore::create(participant);
|
||||
result.append(participantCore);
|
||||
}
|
||||
auto meCore = ParticipantCore::create(chatRoom->getMe());
|
||||
if (meCore) result.append(meCore);
|
||||
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()->sync();
|
||||
|
||||
if (!mMonitor->getParams()->publishEnabled()) {
|
||||
auto params = mMonitor->getParams()->clone();
|
||||
params->enablePublish(true);
|
||||
mMonitor->setParams(params);
|
||||
}
|
||||
|
||||
auto presenceModel = ToolModel::appPresenceToCorePresenceModel(presence, presenceNote);
|
||||
core->setPresenceModel(presenceModel); // No api (yet) at the account level
|
||||
|
||||
|
|
|
|||
|
|
@ -1589,8 +1589,11 @@ VariantObject *Utils::getCurrentCallChat(CallGui *call) {
|
|||
auto chatCore = ChatCore::create(linphoneChatRoom);
|
||||
return QVariant::fromValue(new ChatGui(chatCore));
|
||||
} else {
|
||||
lInfo() << "[Utils] Did not find existing chat room, create one";
|
||||
linphoneChatRoom = ToolModel::createCurrentCallChat(callModel);
|
||||
// Only try to create chatroom if 1-1 call
|
||||
if (!callModel->getConference()) {
|
||||
lInfo() << "[Utils] Did not find existing chat room, create one";
|
||||
linphoneChatRoom = ToolModel::createCurrentCallChat(callModel);
|
||||
}
|
||||
if (linphoneChatRoom != nullptr) {
|
||||
lInfo() << "[Utils] Chatroom created with" << callModel->getRemoteAddress()->asStringUriOnly();
|
||||
auto id = linphoneChatRoom->getIdentifier();
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ FocusScope {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(49)
|
||||
focus: true
|
||||
isError: groupNameItem.errorMessage !== ""
|
||||
KeyNavigation.down: addParticipantsLayout //participantList.count > 0 ? participantList : searchbar
|
||||
Accessible.name: qsTr("group_start_dialog_subject_hint")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@ FocusScope {
|
|||
if (chat) messageSender.text = mainItem.chat.core.sendingText
|
||||
}
|
||||
onTextChanged: {
|
||||
if (text !== "" && mainItem.chat.core.composingName !== "") {
|
||||
if (text !== "") {
|
||||
mainItem.chat.core.lCompose()
|
||||
}
|
||||
var lastChar = text.slice(-1)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ AbstractWindow {
|
|||
zrtpValidation.open()
|
||||
}
|
||||
} 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)
|
||||
} else if (callState === LinphoneEnums.CallState.Error
|
||||
|| callState === LinphoneEnums.CallState.End) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue