Version: 0.11 (using KDE KDE 3.5.0) Installed from: Debian testing/unstable Packages If i delete an MSN contact from my list, then close and restart Kopete, the users always re-appear on my list. I have been trying to get some people off my list for weeks with no success.
SVN commit 513817 by mlarouche: BUG: 122317 Fix deletion of MSN contact. Delete MSNContact instance when the remove command is confirmed by MSN Notification server. M +9 -3 msnaccount.cpp M +16 -18 msncontact.cpp --- branches/kopete/0.12/kopete/protocols/msn/msnaccount.cpp #513816:513817 @@ -1062,6 +1062,7 @@ // The FL list only use the contact GUID, use the contact referenced by the GUID. MSNContact *contactRemoved = findContactByGuid(contactGuid); QStringList groupGuidList; + bool deleteContact = groupGuid.isEmpty() ? true : false; // Delete the contact when the group GUID is empty. // Remove the contact from the contact list for all the group he is a member. if( groupGuid.isEmpty() ) { @@ -1112,6 +1113,11 @@ } } } + if(deleteContact && contactRemoved) + { + kdDebug(14140) << k_funcinfo << "Deleting the MSNContact " << contactRemoved->contactId() << endl; + contactRemoved->deleteLater(); + } } } @@ -1371,13 +1377,13 @@ MSNContact *MSNAccount::findContactByGuid(const QString &contactGuid) { - kdDebug(14140) << k_funcinfo << endl; + kdDebug(14140) << k_funcinfo << "Looking for " << contactGuid << endl; QDictIterator<Kopete::Contact> it( contacts() ); for ( ; it.current(); ++it ) { - MSNContact *c = static_cast<MSNContact *>( *it ); + MSNContact *c = dynamic_cast<MSNContact *>( it.current() ); - if(c && c->property( MSNProtocol::protocol()->propGuid ).value().toString() == contactGuid ) + if(c && c->guid() == contactGuid ) { kdDebug(14140) << k_funcinfo << "OK found a contact. " << endl; // Found the contact GUID --- branches/kopete/0.12/kopete/protocols/msn/msncontact.cpp #513816:513817 @@ -84,6 +84,7 @@ MSNContact::~MSNContact() { + kdDebug(14140) << k_funcinfo << endl; } bool MSNContact::isReachable() @@ -224,28 +225,25 @@ MSNNotifySocket *notify = static_cast<MSNAccount*>( account() )->notifySocket(); if( notify ) { - if( m_serverGroups.isEmpty() || onlineStatus() == MSNProtocol::protocol()->UNK ) + if( hasProperty(MSNProtocol::protocol()->propGuid.key()) ) { - if( hasProperty(MSNProtocol::protocol()->propGuid.key()) ) + // Remove from all groups he belongs (if applicable) + for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it ) { - kdDebug( 14140 ) << k_funcinfo << "Removing contact from top-level." << endl; - notify->removeContact( contactId(), MSNProtocol::FL, guid(), QString::null ); + kdDebug(14140) << k_funcinfo << "Removing contact from group \"" << it.key() << "\"" << endl; + notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() ); } - else - { - kdDebug( 14140 ) << k_funcinfo << "The contact is already removed from server, just delete it" << endl; - deleteLater(); - } - return; + + // Then trully remove it from server contact list, + // because only removing the contact from his groups isn't sufficent from MSNP11. + kdDebug( 14140 ) << k_funcinfo << "Removing contact from top-level." << endl; + notify->removeContact( contactId(), MSNProtocol::FL, guid(), QString::null); } - - // Remove from all groups he belongs (if applicable) - for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it ) - notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() ); - - // Then trully remove it from server contact list, - // because only removing the contact from his groups isn't sufficent from MSNP11. - notify->removeContact( contactId(), MSNProtocol::FL, guid(), QString::null); + else + { + kdDebug( 14140 ) << k_funcinfo << "The contact is already removed from server, just delete it" << endl; + deleteLater(); + } } else {
This still doesn't appear to be quite working as expected (at least in 0.12 beta 1 which I am currently running). I can delete the contacts fine, but they still tend to turn up on my contact list in a "Not on your contact list" group for some reason.
"Not on your contact list" is normal, that temporary contacts. The contact you supprimed still have you in their contact list, and they open connections to get display picture for example.
This doesn't appear to be the case. If I look at the User Info screen for that MSN contact it says I am not on that users contact list. Either this is inaccurate or something else is going wrong somewhere. In any case, would it be possible to make this group invisible?
the user info screen is accurate only if the contact is on your contactlist.
You should block the contact, so it will not be able to request your picture.
*** Bug 119034 has been marked as a duplicate of this bug. ***
SVN commit 574872 by ogoffart: Fix a problem where you cannot remove MSN contacts. I have this patch localy for months, but i forgot to commit it. Cf first part of BUG 122317 (the commit r513817 was not enough) CCBUG: 122317 M +2 -3 msnaccount.cpp --- branches/KDE/3.5/kdenetwork/kopete/protocols/msn/msnaccount.cpp #574871:574872 @@ -458,10 +458,9 @@ c->setOnlineStatus( MSNProtocol::protocol()->FLN ); addContactServerside( c->contactId() , c->metaContact()->groups() ); } - else //the contact had been deleted, give him the unknown status + else //the contact had been deleted, remove it. { - c->clearServerGroups(); - c->setOnlineStatus( MSNProtocol::protocol()->UNK ); + c->deleteLater(); } } }
thanks, i will try the next relase of kopete, because now i
Thank you for the patch, I'm already trying it and I still haven't seen the "Not on your contact list" problem. Before upgrading from 0.12.2 to the latest svn, I had some "Not on your contact list" contacts appearing occasionally in my list, so far so good with the patch.
I don't know if my problem is linked to this bug : With Kopete 0.12.1, when I try to delete an MSN contact, my MSN connection is cut (with no other error). And, when I restart my MSN connection, the contact appears again. So it's impossible to remove this contact.
Using Kopete 0.12.4 and still I'm having problems with different contact lists and duplicate MSN contacts. Using Gaim while it gets fixed. I'll try every new release but I refuse to use Kopete now that I know that with Gaim I can manage my contact list between every machine I have.
*** Bug 139409 has been marked as a duplicate of this bug. ***
I'm unclear - is this going to be fixed? It's extremely idiosynchratic behaviour. Will those patches mentioned above be committed to the next release version? (Ubuntu 7.04, Kopete 0.12.4)
This bug seems a little confused. It is marked as WONTFIX but I can't see any explanation/justification for this in the comments, can anyone clarify? I use MSN over jabber, and at the moment every time I log in I've to deny access to over 60 "deleted" contacts - so this is a bit of an annoyance for me :)
Why is this marked WONTFIX? Deleting MSN contacts in Kopete does not work in KDE3.5.9 or KDE SVN-TRUNK.
I would also like to know why this WONTFIX... It seems rather ridiculous.
may be because the fix is not GNU i cant use kopete like this
Is not GNU what???!?!?
To me it looks like the bug was marked WONTFIX accidentially when it should have been marked FIXED. According to the comments it's either not fully fixed or the problem popped up again, therefore reopening.
We've completely replaced the current MSN implementation with a new MSN implementation which If you continue to experience this bug after testing the new implementation (which can be gotten from our subversion repository or with the KDE 4.2 Beta 1 release), PLEASE, open a new bug rather than reopening this bug. Thank you for your time and efforting in helping us find and fix problems in Kopete.