From b02eb7eed6773d98733ad44a2092a3e6180112c9 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Tue, 22 Jun 2010 12:53:06 +0000 Subject: when we receive a roster "set" iq (push), store updated entries --- source/QXmppRoster.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/QXmppRoster.cpp') diff --git a/source/QXmppRoster.cpp b/source/QXmppRoster.cpp index ffeea2a8..8b2a821d 100644 --- a/source/QXmppRoster.cpp +++ b/source/QXmppRoster.cpp @@ -103,6 +103,15 @@ void QXmppRoster::rosterIqReceived(const QXmppRosterIq& rosterIq) returnIq.setId(rosterIq.id()); m_stream->sendPacket(returnIq); + // store updated entries and notify changes + QList items = rosterIq.items(); + for (int i = 0; i < items.count(); i++) + { + QString bareJid = items.at(i).bareJid(); + m_entries[bareJid] = items.at(i); + emit rosterChanged(bareJid); + } + // when contact subscribes user...user sends 'subscribed' presence // then after recieving following iq user requests contact for subscription -- cgit v1.2.3