Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
Tanuva #1
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: Presence not showing up in RosterControl although set
G'evening,

Im experiencing a strange problem with the RosterControl. Im setting presence and RosterItems like in the sample client (which doesnt really work...), but the RosterItems (= people in the contact list) stay shown as offline although they should be in the online group. Can anyone tell me whats wrong?

My codes here:
http://rafb.net/p/SVdxW845.html
Avatar
Alex #2
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
took a quick look at the code and it looks ok to me so far.
Are you sure that your subscription to the contacts is OK. You get the presence only if you are subscribed correctly to the contacts.
The subscription must be both if you want that the contacts see each others presence.

Alex
Avatar
Tanuva #3
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Yep, the subscription is okay on both sides, checked back with another jabber client.
Avatar
Alex #4
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Does the RosterControl in the MiniClient example work for you?
Avatar
Tanuva #5
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
No, it doesnt show up online contacts, too. But the RosterItems are there, in both my client and the MiniClient, they just wont switch to the online group. I took another look at my code and my debug form shows that the presence event gets fired, but the state of the contact doesnt change in the RosterControl. Maybe theres a bug in it? (But why does it work for other people then...?)
Avatar
Alex #6
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
ya, this is what i don't understand.
We never had a problem with the roster control yet, there are also no known problems by other people.
And its very weird because you say your presence events get fired. Did you try to debug the SetPresence function?
Do you set your own presence after you have received the entire roster?

Alex
Avatar
Tanuva #7
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Im currently calling SendMyPresence() in the method hooked onto OnLogin, shouldnt that do the job?
And I can take a look at SetPresence(), but dont expect too much... :)
Avatar
Tanuva #8
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Hmm.... cant find what may be wrong there... strange...
Avatar
Alex #9
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Does our compiled MiniClient .NET 2 example work with your account?
If this also does not work for you then the problem must be on your server or with the account.

Alex
Avatar
Tanuva #10
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Just tested it other way round, with the selfmade-client-test-account in Gaim and my Jabber account in the MiniClient and it worked. But where may be the problem with the account, its an account like anything else... (Yes, the subscriptions are alright [would be a too easy solution :( ])

Ive another idea. This is from my log:

OnLogin
SettingPresence: tanuva
Rosteritem empfangen: the_godfather (jabber.ccc.de)
AddRosterItem: the_godfather
Rosteritem empfangen: Tanuva (jabber.ccc.de)
AddRosterItem: Tanuva

Where OnLogin tells us that (who would think of that) the OnLogin event has been fired.
SettingPresence corresponds with the OnPresence event, where my code is:
FrmDebug.TxtBDebug.Text += "SettingPresence: " + pres.From.User + "\r\n";
After this, the RosterItems arrive. After this? Maybe the presence is not set correctly because the RosterItem simply doesnt exist yet when it arrives? That would explain why the contact stays offline. Or did I think a wrong way?
This post was edited 2 times, last on 2007-02-14, 17:53 by Tanuva.
Avatar
Alex #11
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes, this may be the problem.
Try to set your own presence after the roster is complete in the OnRosterEnd Event.
You will not get any presence packet from the server before you send your own presence.

Alex
Avatar
Tanuva #12
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Arr! That was such a good idea and it doesnt help at all.
OnLogin
Rosteritem empfangen: the_godfather (jabber.ccc.de)
AddRosterItem: the_godfather
Rosteritem empfangen: Tanuva (jabber.ccc.de)
AddRosterItem: Tanuva
Sending my presence
SettingPresence: tanuva   // Initial status: online
SettingPresence: tanuva   // Changed my account to offline in Gaim
SettingPresence: tanuva   // Online again

While all this the RosterItem representing the logged-into-Gaim-account stays offline. :(

This is the code Im using to set the presences. Alright with it, or not?
rosterCtl.SetPresence(pres);
rosterCtl.Update();
Avatar
Alex #13
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
in your debug log Tanuva has a capital T in the roster and a small t in the presence.
Could this be the problem? Because this is not the same user.

Alex
Avatar
Tanuva #14
Member since Feb 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Looking at the bare data I saw that its "Tanuva@jabber.ccc.de" in the RosterItem and "tanuva@jabber.ccc.de" in the presence packet. That must be what prevents the roster from showing me online in the under-development-client. Seems like I either gotta find out what capitalizes the T in my nick, or need to change the RosterControl so that it performs the if-contains-item-then-set-presence check with fully lowercase items/user@server strings.
Avatar
Alex #15
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
when you add users to your roster you should prepare the username with the stringprep profiles.
They also normalize the username. The latest developer version in SVN has stringprep support.
If you wanna work without stringprep then just lower the Jid.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next
Forum: agsXMPP RSS