Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
parthy #1
Member since Mar 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to get the from JID?
Hi,

I am trying to get the from JID from an iq and I using the sample server. I need this "from" JID to get the roster for that users.

iq.From returns null.

        private void ProcessRosterIQ(IQ iq)
        {
            if (iq.Type == IqType.get)
            {
                // Send the roster

                iq.SwitchDirection();
                iq.Type = IqType.result;
                                Console.Writelin(iq.From); <= returns null

Can I get the from jid somehow?

Thank you,
parthy
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The from attribute is optional for a client. There is no need to get the from Jid, because the servers knows the Jid of the client when it's authenticated.

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:
Forum: agsXMPP RSS