On Tuesday 02 May 2006 07:16, Jan Ritzerfeld wrote: > Hey... > > I noticed a small problem with my patch for > http://bugs.kde.org/show_bug.cgi?id=116614 sometimes the status message of > a meta-contact showed in the contact list won't be the one I expected. > This happens when the meta-contact consists of a sub-contact that supports > offline status messages (here: jabber) and a sub-contact that doesn't > remove its away message property when it goes offline (here: icq). The > order of the sub-contacts is important. > If the first sub-contact is offline and the second one logs in as away its > away message will be fetched and will replace the offline status message of > the first sub-contact. If the second sub-contact goes offline the first > sub-contact will be able to overwrite the status message displayed in the > contact list. > Let's assume that this happened and all sub-contacts are now offline. If > the second sub-contact logs in as away with the same away message again > setProperty(...) won't emit propertyChanged(...) since the away message > didn't change! So, the status message displayed in the contact list will be > the one of the offline first sub-contact. > > I suppose to remove the away message property of an icq contact when it > goes online, i.e. it was offline and changes its status to something else > than offline or unknown. The attached patch invalidates the old away > message if the contact is not online before its new online status is set. > There are plenty of debug messages which will be removed. > The important part is very short and simple: > > void ICQContact::userInfoUpdated( const QString& contact, const > UserDetails& details ) > { > if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) > return; > > + if ( !isOnline() ) > + removeProperty( mProtocol->awayMessage ); > > ICQ::Presence presence = > ICQ::Presence::fromOscarStatus( details.extendedStatus() & 0xffff > ); setOnlineStatus( presence.toOnlineStatus() ); > > Gruß > Jan
please commit -- Matt _______________________________________________ kopete-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/kopete-devel
