Skip to content
Snippets Groups Projects
Commit 989ab7ac authored by aviau's avatar aviau Committed by Stepan Salenikovich
Browse files

track Ring ContactMethods by default

- Track Ring ContactMethods as soon as they have an account
  associated to them.

- Fix setTracked's subscribeBuddyto call include the USER_INFO, which
  is absolutely necessary for it to work.

Tuleap: #1379
Change-Id: I0e82021a3aac9cac1b3a4e0e2352d9859168c4b4
parent 3285fc59
No related branches found
No related tags found
No related merge requests found
...@@ -201,6 +201,12 @@ void ContactMethod::setAccount(Account* account) ...@@ -201,6 +201,12 @@ void ContactMethod::setAccount(Account* account)
if (d_ptr->m_pAccount) if (d_ptr->m_pAccount)
connect (d_ptr->m_pAccount,SIGNAL(destroyed(QObject*)),this,SLOT(accountDestroyed(QObject*))); connect (d_ptr->m_pAccount,SIGNAL(destroyed(QObject*)),this,SLOT(accountDestroyed(QObject*)));
//Track Ring contacts by default
if (this->protocolHint() == URI::ProtocolHint::RING || this->protocolHint() == URI::ProtocolHint::RING_USERNAME) {
setTracked(true);
}
d_ptr->changed(); d_ptr->changed();
} }
...@@ -303,6 +309,7 @@ void ContactMethod::setTracked(bool track) ...@@ -303,6 +309,7 @@ void ContactMethod::setTracked(bool track)
PresenceManager::instance().subscribeBuddy(d_ptr->m_pAccount->id(), PresenceManager::instance().subscribeBuddy(d_ptr->m_pAccount->id(),
uri().format(URI::Section::CHEVRONS | uri().format(URI::Section::CHEVRONS |
URI::Section::SCHEME | URI::Section::SCHEME |
URI::Section::USER_INFO |
URI::Section::HOSTNAME), URI::Section::HOSTNAME),
track); track);
d_ptr->changed(); d_ptr->changed();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment