mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Second fix on peer address in conversation to use the participant.
This commit is contained in:
parent
180d9bc8df
commit
66bab864b5
3 changed files with 4 additions and 16 deletions
|
|
@ -494,7 +494,7 @@ QList<QString> ChatRoomModel::getComposers(){
|
|||
return mComposers.values();
|
||||
}
|
||||
|
||||
QString ChatRoomModel::getParticipantAddress(){
|
||||
QString ChatRoomModel::getParticipantAddress() const{
|
||||
if(!isSecure()){
|
||||
auto peerAddress = mChatRoom->getPeerAddress();
|
||||
if( peerAddress)
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@ public:
|
|||
Q_INVOKABLE QString getFullPeerAddress () const;
|
||||
Q_INVOKABLE QString getFullLocalAddress () const;
|
||||
Q_INVOKABLE QString getConferenceAddress () const;
|
||||
|
||||
Q_INVOKABLE QString getParticipantAddress() const; // return peerAddress if not secure else return the first participant SIP address.
|
||||
|
||||
QString getSubject () const;
|
||||
QString getUsername () const;
|
||||
QString getAvatar () const;
|
||||
|
|
@ -144,7 +145,6 @@ public:
|
|||
std::list<std::shared_ptr<linphone::Participant>> getParticipants(const bool& withMe = true) const;
|
||||
std::shared_ptr<linphone::ChatRoom> getChatRoom();
|
||||
QList<QString> getComposers();
|
||||
QString getParticipantAddress(); // return peerAddress if not secure else return the first participant SIP address.
|
||||
int getAllUnreadCount(); // Return unread messages and missed call.
|
||||
|
||||
//---- Setters
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ ColumnLayout {
|
|||
|
||||
|
||||
property ChatRoomModel chatRoomModel
|
||||
property string peerAddress : getPeerAddress()
|
||||
property string localAddress : chatRoomModel?chatRoomModel.getLocalAddress() : defaultLocalAddress
|
||||
property string fullPeerAddress : getFullPeerAddress()
|
||||
property string fullLocalAddress : chatRoomModel?chatRoomModel.getFullLocalAddress() : defaultFullLocalAddress
|
||||
|
|
@ -42,21 +41,10 @@ ColumnLayout {
|
|||
property bool haveMoreThanOneParticipants: chatRoomModel ? chatRoomModel.participants.count > 2 : false
|
||||
property bool haveLessThanMinParticipantsForCall: chatRoomModel ? chatRoomModel.participants.count <= 5 : false
|
||||
|
||||
function getPeerAddress() {
|
||||
if(chatRoomModel) {
|
||||
if(chatRoomModel.groupEnabled || chatRoomModel.isSecure()) {
|
||||
return chatRoomModel.getPeerAddress();
|
||||
}else {
|
||||
return chatRoomModel.sipAddress;
|
||||
}
|
||||
}else {
|
||||
return defaultPeerAddress
|
||||
}
|
||||
}
|
||||
function getFullPeerAddress() {
|
||||
if(chatRoomModel) {
|
||||
if(chatRoomModel.groupEnabled || chatRoomModel.isSecure()) {
|
||||
return chatRoomModel.getFullPeerAddress()
|
||||
return chatRoomModel.getParticipantAddress()
|
||||
}else {
|
||||
return chatRoomModel.sipAddress;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue