Bug 99671 - [aim] not all online users shown
Summary: [aim] not all online users shown
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: ICQ and AIM Plugins (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 100488 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-18 06:15 UTC by Dan Doel
Modified: 2005-03-03 19:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Debug log - read info -> seeing two more people on aim (69.92 KB, text/plain)
2005-02-18 17:08 UTC, Brian S. Stephan
Details
Screenshot (48.51 KB, image/jpeg)
2005-02-19 18:47 UTC, Sean Lynch
Details
patch to normalize contactId() comparisons (3.95 KB, patch)
2005-02-26 00:30 UTC, Brian S. Stephan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Doel 2005-02-18 06:15:58 UTC
Version:           cvs (using KDE KDE 3.3.92)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.5 
OS:                Linux

Hi,

I noticed when upgrading to KDE 3.4.0 beta2 that some people on my contact list who are, in fact, online (I can go to their room and check) aren't shown as online on my contact list. For instance, I am currently talking to a person who Kopete thinks is offline. I checked out Kopete from CVS, and I'm still seeing this behavior.

Talking to 'offline' users doesn't cause Kopete to realize that they're online. However, viewing their user information usually does (if they're online) cause Kopete to realize that they are, in fact, online (though it doesn't always).

The issue sounds similar to this bug: http://bugs.kde.org/show_bug.cgi?id=49278  although that is quite old.

This didn't happen in beta1, so I assume it has something to do with a few kinks in the new oscar backend.

Thanks for your help.
Comment 1 Matt Rogers 2005-02-18 06:22:53 UTC
do they show up in your list correctly as online using a different client (i.e. gaim, or preferably, the official winaim client)?

Also, debug output would be helpful. you probably didn't build with debug. Add "debug" to USE and "nostrip" to FEATURES and recompile kdenetwork to get debug output. something like USE="debug" FEATURES="nostrip" emerge kdenetwork should do.
Comment 2 Brian S. Stephan 2005-02-18 06:51:25 UTC
I am using the split 3.4 beta 2 ebuilds in Gentoo and I have similar behavior.

I think it has something to do with the user's default formatted name (the one you see when you mouse-over the AIM icon, NOT the name you set for them locally) and spaces, but this is a hunch.

The behavior I see:
1) AIM contact with no spaces in their formatted name
   These people I can see on AIM fine.
2) AIM contact with spaces
   I can't see these people unless I get their info, like the original post said

I have time to test and am recompiling now. What should I do/look for when I recompile Kopete, Matt?
Comment 3 Brian S. Stephan 2005-02-18 06:54:51 UTC
Oh, I forgot to mention, sorry, I see these people fine with Gaim. I don't have a Win box available at the moment to try the "official" client.
Comment 4 Brian S. Stephan 2005-02-18 07:21:32 UTC
Whoop, no, I got some more people to sign on and some of them didn't have spaces in their names but I couldn't see them until I got their info. I did enable debugging though and I have a log of me signing on, not seeing two people, then getting their info (one with spaces in their name, one without) and they both showed up. Is this good enough or would you like to see something more/different?
Comment 5 Matt Rogers 2005-02-18 14:46:16 UTC
that should be good enough. please attach the log to the bug report, and I will look into it.
Comment 6 Brian S. Stephan 2005-02-18 17:08:58 UTC
Created attachment 9699 [details]
Debug log - read info -> seeing two more people on aim

I tried to have as little happen as possible in the log. I only signed on to
AIM, let the list load, and then got the info for two people, making them show
up on the list. These people are "LawBoy84" and "Z o a s a m" (as their names
appear according to AIM). Then I disconnected.
Comment 7 Sean Lynch 2005-02-19 18:47:09 UTC
Created attachment 9726 [details]
Screenshot

This might help.  I have a user that I finally got fixed on my buddy list  to
show up (added through a different AIM client), but now when I IM him, he gets
the message but his response, whether an auto response or other, comes from a
'different' sn, such the reply is one without spaces in his name, although the
one which works in the contact list has a space.
Comment 8 Matt Rogers 2005-02-23 20:01:04 UTC
i know what the problem is. Will work on a fix as motivation allows (lots of code to change)
Comment 9 Brian S. Stephan 2005-02-24 17:17:31 UTC
Do you think there is any kind of workaround? What's the problem? Is it at all fixable by a newbie to Kopete code (but not to programming)?
Comment 10 Matt Rogers 2005-02-24 17:40:40 UTC
it's pretty simple.

1. Change Oscar::normalize( const QString& ) in oscarutils.{h,cpp} to remove 
the spaces ( basically, take the tocNormalize function from the old code )

2. normalize the names we get from SSI, right now, they're not normalized

3. everywhere that contactId() is used in comparisons with the contact id we 
get from the backend, make sure the normalize function is used on both on 
both strings.

doing item one is easy, doing item two is harder, doing item three is the 
hardest since there are many places to look.

patches accepted if i don't get around to doing it first. :)

all the relevant code is in kdenetwork/kopete/protocols/oscar and its subdirs.
Comment 11 Brian S. Stephan 2005-02-26 00:30:13 UTC
Created attachment 9841 [details]
patch to normalize contactId() comparisons

This doesn't fix the AIM problem but I think it's everything that needs to be
done for part 3. I'm submitting this because in the process it let me see a
couple more people on ICQ that I guess actually WERE online...

Hope that's all of the comparisons.
Comment 12 Brian S. Stephan 2005-02-26 23:01:02 UTC
Hmm. The patch has helped with a couple of my AIM accounts too. See them fine on Gaim, don't see them in Kopete without the patch.

I tried addressing part 2 (part 1 is already done?) and I didn't have any success or see any better results. I guess that should be left to someone more competent. :)
Comment 13 Matt Rogers 2005-02-28 05:23:21 UTC
part 1 isn't done yet, it should be simple to add something like

string.remove(" ");

or similar to Oscar::normalize( const QString& ) in oscarutils.{h,cpp} to do 
part one.

part 2 probably needs to be done in the SSI tasks. see ssimodifytask.* and 
ssilisttask.* if you're interested in creating another patch. :)

Comment 14 Will Stephenson 2005-03-01 00:13:29 UTC
*** Bug 100488 has been marked as a duplicate of this bug. ***
Comment 15 Gustavo Pichorim Boiko 2005-03-03 13:28:56 UTC
CVS commit by boiko: 


Normalize IDs (convert to lower case, and remove whitespaces), so we can handle 
the messages from server better.

Is it ok to backport?

BUG: 99671
CCMAIL: coolo@kde.org
CCMAIL: kopete-devel@kde.org


  M +14 -13    kopete.kdevelop   1.42
  M +4 -4      protocols/oscar/aim/aimcontact.cpp   1.71
  M +7 -7      protocols/oscar/icq/icqcontact.cpp   1.73
  M +5 -4      protocols/oscar/liboscar/ssiauthtask.cpp   1.4
  M +3 -0      protocols/oscar/liboscar/ssilisttask.cpp   1.3
  M +9 -6      protocols/oscar/liboscar/ssimodifytask.cpp   1.5



Comment 16 Gustavo Pichorim Boiko 2005-03-03 14:29:20 UTC
Brian, sorry. I forgot to mention my patch was based on yours :(
Comment 17 Brian S. Stephan 2005-03-03 19:44:41 UTC
Oh cool, I was just going to suggest someone else give it a go since I became too busy to work on it immediately, great. :)