[ejabberd] Change jabber users Presence externally from another application

duane.larson at gmail.com duane.larson at gmail.com
Wed Aug 1 02:09:34 MSK 2012


These Clients also don't work with this.

Trillian
Jitsi
OneTeam


They all reply back with

<iq xmlns="jabber:client" type="error"  
to="ClientB at ae.com/jaxl.1.1343770298" id="ss-2" >
<query xmlns="google:shared-status" version="2" >
<status>On Phone</status>
<show>dnd</show>
<status-list show="dnd" >
<status>On Phone</status>
</status-list>
<status-list show="default" >
<status>I'm Here</status>
</status-list>
<invisible value="false" />
</query>
<error type="cancel" >
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>


On , duane.larson at gmail.com wrote:
> What XML is wrong? And what do you mean by "missing start elements".

> Here is what happens when a status is sent


> T 2012/07/31 16:19:09.613374 50.XX.XX.54:35817 -> 184.XX.XX.30:5222 [AP]
> ClientA at ae.com/Work' id='ss-2'>On PhonedndOn Phonestatus-list  
> show='default'>I'm Hereinvisible value='false'/>stream:stream>
> ###
> T 2012/07/31 16:19:09.676226 184.XX.XX.30:5222 -> 50.XX.XX.54:35817 [AP]

> #
> T 2012/07/31 16:19:09.676432 184.XX.XX.30:5222 -> 216.XX.XX.203:55111 [AP]
> ClientA at ae.com/jaxl.1.1343769549' to='ClientA at ae.com/Work' xml:lang='en'  
> type='set' id='ss-2'>On PhonedndOn Phonestatus-list show='default'>I'm  
> Hereinvisible value='false'/>
> ##
> T 2012/07/31 16:19:09.676732 50.XX.XX.54:35817 -> 184.XX.XX.30:5222 [R]
> ......
> #
> T 2012/07/31 16:19:09.676914 50.XX.XX.54:35817 -> 184.XX.XX.30:5222 [R]
> ......
> #
> T 2012/07/31 16:19:09.715837 216.XX.XX.203:55111 -> 184.XX.XX.30:5222 [AP]
> dndstatus>On Phonehttp://jabber.org/protocol/caps'  
> node='http://pidgin.im/' hash='sha-1'  
> ver='1RsmhQD7CXz0TuytinljsuOTrVU='/>photo>230943e067d7a7a48bb7e751b8008fe3ec6f59afpresence>
> #
> T 2012/07/31 16:19:09.716480 184.XX.XX.30:5222 -> 216.XX.XX.203:55111 [AP]
> ClientA at ae.com/Work' to='ClientA at ae.com/Work'>show>dndOn  
> Phonehttp://jabber.org/protocol/caps' node='http://pidgin.im/'  
> hash='sha-1'  
> ver='1RsmhQD7CXz0TuytinljsuOTrVU='/>photo>230943e067d7a7a48bb7e751b8008fe3ec6f59afpresence>
> #
> T 2012/07/31 16:19:09.716610 184.XX.XX.30:5222 -> 216.XX.XX.203:32670 [AP]
> ClientA at ae.com/Work' to='ClientB at ae.com/4CZ13001LS'>dndOn  
> Phonehttp://jabber.org/protocol/caps' node='http://pidgin.im/'  
> hash='sha-1'  
> ver='1RsmhQD7CXz0TuytinljsuOTrVU='/>photo>230943e067d7a7a48bb7e751b8008fe3ec6f59afpresence>

> On , Kirk Bateman kirk.bateman at gmail.com> wrote:
> > Duane,
> > OK, the XML looks wrong but hey it works :-)
> > The status-list elements look to be missing start elements ? Is  
> anything rebroadcasting the normal message after you sendSharedOnPhone ?  
> Or are you using that as direct presence to each client ? (Try with more  
> clients, you should only have to send the IQ once and the server should  
> handle updating presence to the clients)
> >
> > Good start though.
> > Cheers
> > Kirk
> > On 31 Jul 2012 22:00, duane.larson at gmail.com> wrote:
> > No I am using addresses that are set up on an ejabberd server.
> >
> > ClientA is a Pidgin client
> > ClientB is a Psi client
> >
> > With the Jaxl library I send the following
> >
> > public static function sendSharedOnPhone($jaxl, $to) {
> >
> > $xml = "";
> > $xml .= "";
> > $xml .= "";
> >
> > $xml .= "On Phone";
> > $xml .= "dnd";
> > $xml .= "";
> > $xml .= "On Phone";
> >
> > $xml .= "";
> > $xml .= "";
> > $xml .= "I'm Here";
> > $xml .= "";
> >
> > $xml .= "";
> > $xml .= "";
> > $xml .= "";
> >
> > $jaxl->sendXML($xml);
> >
> > }
> >
> >
> > When that gets sent the Psi client shows that Buddy ClientA is "On  
> Phone" and the icon is a "dnd" icon. The Pidgin client for ClientA  
> automatically has its presence set to On phone and dnd.
> >
> >
> > Then when I am ready I send the following
> >
> > public static function sendSharedAvail($jaxl, $to) {
> > $xml = "";
> > $xml .= "";
> >
> > $xml .= "";
> > $xml .= "Available";
> > $xml .= "default";
> >
> > $xml .= "";
> > $xml .= "I'm Here";
> > $xml .= "";
> > $xml .= "";
> >
> > $xml .= "On Phone";
> > $xml .= "";
> > $xml .= "";
> > $xml .= "";
> >
> > $xml .= "";
> >
> > $jaxl->sendXML($xml);
> >
> > }
> >
> >
> > And everything is back to normal.
> >
> > This works with Pidgin is ClientA. If Psi is ClientA then it won't work  
> because Psi doesn't have a google shared status plugin.
> >
> >
> > On , Kirk Bateman kirk.bateman at gmail.com> wrote:
> > > Duane,
> > > Glad you got something working, I'm assuming you tested using gmail  
> addresses as I can only see any client side functionality mentioned so  
> far.
> >
> > > I'm looking at what is involved to implement the server side support  
> for shared-status functionality, it doesn't look too much work so far.
> > > Regards
> > > Kirk
> > >
> > _______________________________________________
> >
> >
> > ejabberd mailing list
> >
> > ejabberd at jabber.ru
> >
> > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> >
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120731/bac40619/attachment.html>


More information about the ejabberd mailing list