Changeset - c854a7fa681d
[Not reviewed]
0 2 0
HanzZ - 13 years ago 2012-10-30 18:06:29
hanzz.k@gmail.com
Do not send subscribed on probe presence. Just subscribe should be enough
2 files changed with 1 insertions and 7 deletions:
0 comments (0 inline, 0 general)
spectrum/src/sample.cfg
Show inline comments
 
@@ -10,13 +10,13 @@ pidfile=./test.pid
 
#backend_port=10001
 
#admin_jid=admin@localhost
 
admin_password=test
 
#cert=server.pfx #patch to PKCS#12 certificate
 
#cert_password=test #password to that certificate if any
 
users_per_backend=10
 
backend=../..//backends/libpurple/spectrum2_libpurple_backend
 
backend=../..//backends/swiften/spectrum2_swiften_backend
 
#backend=../../backends/twitter/spectrum2_twitter_backend
 
#backend=/home/hanzz/code/libtransport/backends/libcommuni/spectrum2_libcommuni_backend
 
protocol=prpl-jabber
 
#protocol=prpl-msn
 
#protocol=any
 
#protocol=prpl-icq
src/usermanager.cpp
Show inline comments
 
@@ -200,18 +200,12 @@ void UserManager::handlePresence(Swift::Presence::ref presence) {
 
			if (/*registered && */presence->getType() == Swift::Presence::Probe) {
 
				Swift::Presence::ref response = Swift::Presence::create();
 
				response->setTo(presence->getFrom());
 
				response->setFrom(presence->getTo());
 
				response->setType(Swift::Presence::Subscribe);
 
				m_component->getStanzaChannel()->sendPresence(response);
 

	
 
				response = Swift::Presence::create();
 
				response->setTo(presence->getFrom());
 
				response->setFrom(presence->getTo());
 
				response->setType(Swift::Presence::Subscribed);
 
				m_component->getStanzaChannel()->sendPresence(response);
 
			}
 

	
 
			// Set user offline in database
 
			if (m_storageBackend) {
 
				UserInfo res;
 
				bool registered = m_storageBackend->getUser(userkey, res);
0 comments (0 inline, 0 general)