Cannt get presence messages on client

Hi!

I am developing a mobile based client messenger which will interact with IM gateway ,

Until now I have succeeded in following steps

Successful steps

  1. Can register a jabber account

  2. Can register a hotmail account (Only hotmail transport is enabled in wildfire)

  3. Can login to wildfire using my jabber id

Problem

4.1) Problem comes when I send presence message to msn transport at msn.MyWildfire

as

I can see in debug widow that server is loging me in to my hotmail account and sends me the presence messages like

But I due to some reason i cant get those presence messages on client side
Alternate Way
4.2) But when I send presence message as


 to server, I again see my server logging me into hotmail account and sending me those presence messages like

This time I am able to get those presence message at client end

NOTE : Jabber says that messages should be sent to resources i.e jid@MyServer/mobile if this is the case I can understand why I cant get messages in 4.1 but still confused why I get same presence messages in 4.2 at client end.

Message was edited by: sajjad.paracha

Message was edited by: sajjad.paracha

Hrm, that is awefully odd. There’‘s actually a chance I’‘m ignoring the lack of resource in my code, which I shouldn’‘t be doing, I should be throwing you an error. That said, I would almost lean towards thinking this has something to do with Wildfire’‘s own routing between the plugin and your client. I mean if my plugin is sending the same presence packet to you and one’‘s getting there and one isn’‘t… I’'m not sure what else I can do, you know?

One more thing !

I want the user of my client to select to which transports it wants to login on startup

let’'s say client has registered his/her hotmail, yahoo accounts for his jabber id now i do following steps

  1. Ask user to check the transports to which it wants to signin in a screen.

  2. If user selected hotmail only i would not like to send

instead i should send

to login hotmail account only .

3) if user selected both i will send 2 presence messages
 a)

 b)

Now these are the cases where i cant send

message , tell me is there anyother way to do that.
Since using

i cant get presence messages of my hotmail contacts from server.

Note: After login using

i get jabber:iq:roster query


iq type=set to=tcm@ MyWildfire /mobile id=480-17 ==

query xmlns=jabber:iq:roster ==

item name=Change your picture jid=mawaisanwar%hotmail.com@msn. MyWildfire subscription=both ==

group == MSN Contacts


Should I send back something to server so that I can get those presence messages now? If yes what should be that message.

Will really appreciate a quick response since I am stuck with this problem since last many days.

Let me prefix this slightly by saying I’‘m having a little trouble following what you are asking. I’'m going to try to answer but I may have missed your point.

sajjad.paracha wrote:

One more thing !

I want the user of my client to select to which transports it wants to login on startup

let’'s say client has registered his/her hotmail, yahoo accounts for his jabber id now i do following steps

  1. Ask user to check the transports to which it wants to signin in a screen.
  1. If user selected hotmail only i would not like to send instead i should send to login hotmail account only .
  1. if user selected both i will send 2 presence messages

a)

b)

Now these are the cases where i cant send message , tell me is there anyother way to do that.

Since using i cant get presence messages of my hotmail contacts from server.

Note: After login using i get jabber:iq:roster query


iq type=set to=tcm@ MyWildfire /mobile id=480-17 ==

query xmlns=jabber:iq:roster ==

item name=Change your picture jid=mawaisanwar%hotmail.com@msn. MyWildfire subscription=both ==

group == MSN Contacts


Is this only after the first time you log in? The plugin looks at your roster and fixes your subscripting for you. You shouldn’'t get that multiple times.

Should I send back something to server so that I can get those presence messages now? If yes what should be that message.

Will really appreciate a quick response since I am stuck with this problem since last many days.

If you didn’‘t send a global presence to the wildfire server itself, you shouldn’'t be able to do much at all really. You need to tell the wildfire server itself that you are loged in. =/

That said, I was looking over XEP-0100, section 4.1, a tad, and I believe I’‘ve screwed something up. Specifically, step 7 is supposed to be optional for the -client-. The thing is, when someone registers with me, I am forcibly putting the JID of the transport in their roster. This is “not cool”. By doing that I’‘m screwing over your ability to choose to not have it in your roster, and therefore the transports wouldn’‘t automatically get presence. By -not- having the transports in your roster, you would easily be able to set it up so that the user can choose whether they want to automatically log into the transport services or not. We set up something weird like this for Spark but it looks like I was doing something dumb to begin with and should have let the client “do their job”, ya know? If I’'m reading you right, fixing this issue would allow you to get around the problems you are running into.

you wrote


If you didn’‘t send a global presence to the wildfire server itself, you shouldn’'t be able to do much at all really. You need to tell the wildfire server itself that you are loged in. =/


How can i send a global presence to wildfire would, it be the message like

a)

or
b)

But if i do so then your plugin also signs me into my hotmail account . i dont want the plugin to behave like that since my client may choos not to login to hotmail, he may just want to login to wildfire.

Right. Actually, this is sort of a hidden feature at the moment, but you can avoid having the transport place it’‘s JID in your roster (and as a result, it won’‘t “hear” you log in and won’'t automatically log you in). You can accomplish this by adding to the iq jabber:iq:register namespace stanza you sent (both get and set) the following:

As for the global presence to wildfire, I believe (b) would do it.