[ejabberd] Change jabber users Presence externally from another application

Kirk Bateman kirk.bateman at gmail.com
Wed Aug 1 02:10:49 MSK 2012


Sorry, its fine, my brain split the <status-list show=XXX> and I lost the
start of it.

Cheers

Kirk
On 31 Jul 2012 22:26, <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]
> <iq type='set' to='ClientA at ae.com/Work' 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></iq></stream:stream>
> ###
> T 2012/07/31 16:19:09.676226 184.XX.XX.30:5222 -> 50.XX.XX.54:35817 [AP]
> </stream:stream>
> #
> T 2012/07/31 16:19:09.676432 184.XX.XX.30:5222 -> 216.XX.XX.203:55111 [AP]
> <iq from='ClientA at ae.com/jaxl.1.1343769549' to='ClientA at ae.com/Work'
> xml:lang='en' type='set' 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></iq>
> ##
> 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]
> <presence><show>dnd</show><status>On Phone</status><c xmlns='
> http://jabber.org/protocol/caps' node='http://pidgin.im/' hash='sha-1'
> ver='1RsmhQD7CXz0TuytinljsuOTrVU='/><x
> xmlns='vcard-temp:x:update'><photo>230943e067d7a7a48bb7e751b8008fe3ec6f59af</photo></x></presence>
> #
> T 2012/07/31 16:19:09.716480 184.XX.XX.30:5222 -> 216.XX.XX.203:55111 [AP]
> <presence from='ClientA at ae.com/Work' to='ClientA at ae.com/Work'><show>dnd</show><status>On
> Phone</status><c xmlns='http://jabber.org/protocol/caps' node='
> http://pidgin.im/' hash='sha-1' ver='1RsmhQD7CXz0TuytinljsuOTrVU='/><x
> xmlns='vcard-temp:x:update'><photo>230943e067d7a7a48bb7e751b8008fe3ec6f59af</photo></x></presence>
> #
> T 2012/07/31 16:19:09.716610 184.XX.XX.30:5222 -> 216.XX.XX.203:32670 [AP]
> <presence from='ClientA at ae.com/Work' to='ClientB at ae.com/4CZ13001LS'><show>dnd</show><status>On
> Phone</status><c xmlns='http://jabber.org/protocol/caps' node='
> http://pidgin.im/' hash='sha-1' ver='1RsmhQD7CXz0TuytinljsuOTrVU='/><x
> xmlns='vcard-temp:x:update'><photo>230943e067d7a7a48bb7e751b8008fe3ec6f59af</photo></x></presence>
>
> 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
> >
> >
> >
> >
> >
> _______________________________________________
> 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/ecb39335/attachment-0001.html>


More information about the ejabberd mailing list