diff --git a/src/address/identity-address.cpp b/src/address/identity-address.cpp index b4cd58714..16cc1b965 100644 --- a/src/address/identity-address.cpp +++ b/src/address/identity-address.cpp @@ -130,6 +130,12 @@ bool IdentityAddress::setGruu (const string &gruu) { return true; } +IdentityAddress IdentityAddress::getAddressWithoutGruu () const { + IdentityAddress address(*this); + address.setGruu(""); + return address; +} + string IdentityAddress::asString () const { Address tmpAddress(*this); return tmpAddress.asStringUriOnly(); diff --git a/src/address/identity-address.h b/src/address/identity-address.h index 2d131623e..e6b25d429 100644 --- a/src/address/identity-address.h +++ b/src/address/identity-address.h @@ -57,6 +57,8 @@ public: const std::string &getGruu () const; bool setGruu (const std::string &gruu); + IdentityAddress getAddressWithoutGruu () const; + virtual std::string asString () const; private: diff --git a/src/conference/participant.cpp b/src/conference/participant.cpp index 4379eb0c1..aa4b475f4 100644 --- a/src/conference/participant.cpp +++ b/src/conference/participant.cpp @@ -88,12 +88,7 @@ void ParticipantPrivate::removeDevice (const IdentityAddress &gruu) { Participant::Participant (const IdentityAddress &address) : Object(*new ParticipantPrivate) { L_D(); - d->addr = address; -} - -Participant::Participant (IdentityAddress &&address) : Object(*new ParticipantPrivate) { - L_D(); - d->addr = address; + d->addr = address.getAddressWithoutGruu(); } // ----------------------------------------------------------------------------- diff --git a/src/conference/participant.h b/src/conference/participant.h index f18b7b5ec..90fce744a 100644 --- a/src/conference/participant.h +++ b/src/conference/participant.h @@ -57,7 +57,6 @@ public: L_OVERRIDE_SHARED_FROM_THIS(Participant); explicit Participant (const IdentityAddress &address); - explicit Participant (IdentityAddress &&address); const IdentityAddress &getAddress () const; bool isAdmin () const;