Status message across transport

I am currently working with Smack and Openfire and I am having trouble taking the status message from client (built using smack) to send across transports.

For instance:

The user is logged on to yahoo, msn, google and ICQ.

If the user changes his status (custom text) as “I am gone for fishing, call me on my cell”, then the user presence in yahoo, msn, gmail (all allow custom text presence message) should be changed accordingly.

I am not able to get this working. Is there a special way of doing this?

Thanks.

The presence status message is not even going to Gtalk across gateway (even though its XMPP as well).

Yahoo / MSN are not experimental gateways and still doesnt allow presence to go across…

I am wondering if anyone has noticed this before !

i’m not really sure what to tell you =) I mean I’ve tested these things and I see them going through just fine!

Here is the snippit of code that I am using in the IM Gateway with Smack to set the appropriate “verbose status” as I call it:

org.jivesoftware.smack.packet.Presence.Mode mode = ((XMPPTransport)getTransport()).convertGatewayStatusToXMPP(presenceType);
        if (mode != null && mode != presence.getMode()) {
            presence.setMode(mode);
        }
        if (presence.getType() != org.jivesoftware.smack.packet.Presence.Type.available) {
            presence.setType(org.jivesoftware.smack.packet.Presence.Type.available);
        }
        if (verboseStatus != null) {
            presence.setStatus(verboseStatus);
        }
        else {
            presence.setStatus("");
        }
        try {
            conn.sendPacket(presence);
            setPresenceAndStatus(presenceType, verboseStatus);
        }
        catch (IllegalStateException e) {
            Log.debug("XMPP: Not connected while trying to change status.");
        }

It would be interesting to see what is coming from the client you are using to the transports.

One thing that might be helpful … did you register with the transports using Spark? If so, that might be the problem right there. Spark handles registration in a special manner that involves not putting the transports themselves in the user’s roster. Because of this, the transports have no automated (via XMPP) way of knowing when your status changes. Spark has to send directed presences to each transport every time the user’s status changes. If you registered with the transports using any other client, or via the admin console, this should not be a problem. Likewise, if you registered using your own client following XEP-0100, then you shouldn’t have this problem.

Thanks for your reply Jadestorm!

No, I am not using Spark / Psi or any other XMPP client. I am trying to change the presence through the client built using smack API.

Lets call my client as ClientA.

ClientA publishes presence : <presence id=“vajQs-12”><status>I am gone fishing</status></presence>

When ClientA is registered with Gtalk directly, his gtalk buddies sees the change in presence. But, when ClientA is logged on to gtalk through the transport, his status (Text message) is not updated. But if there is “show” field in the presence and sent to Openfire, Gtalk transport updates the show (and no text)

Other transport doesn’t see any change.

Let me know if this information gives you any clue?

Btw, Happy new year!

Hi.

I’m having the same trouble with status messages. I’m using Flex + XIFF library to connect to Openfire with IM gateway installed.

Here’s what I see when I’m sending presence information with status test:

outgoing: awayAway0</presenc e>

the users that sent this message recieves:

incoming: awayAway

and the rest of the users who are online get the following:

incoming: away

For some reason the status message is being truncated from the presence tag and users recieve only tag.

I hope you can help me in this,

Thanks.