From 9496885d63d2493b36cbe141834571cc8387fc6f Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 26 Mar 2011 19:58:31 +0100 Subject: [PATCH] Don't ask the user again to ack the subscription request in sip_jabber if the requesting contact is already on the roster --- src/sip/jabber/jabber_p.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sip/jabber/jabber_p.cpp b/src/sip/jabber/jabber_p.cpp index aa2a5598d..9f2d6276b 100644 --- a/src/sip/jabber/jabber_p.cpp +++ b/src/sip/jabber/jabber_p.cpp @@ -601,6 +601,17 @@ Jabber_p::handleSubscriptionRequest( const JID& jid, const std::string& /*msg*/ { qDebug() << Q_FUNC_INFO << jid.bare().c_str(); + // check if the requester is already on the roster + RosterItem *item = m_client->rosterManager()->getRosterItem(jid); + if(item) + { + qDebug() << Q_FUNC_INFO << "Already on the roster so we assume ack'ing subscription request is okay..."; + return true; + } + + + + // ask whether to accept subscription request or not QMessageBox::StandardButton allowSubscription; allowSubscription = QMessageBox::question( 0, tr("Friend Request in Jabber"),