[jdev] Problems with status notifications
Jan Hanseth
janet.hanseth at gmail.com
Tue Feb 1 16:13:31 CST 2005
Hi all,
I'm developing a group chat/whiteboard client using the XIFF
libraries, using jabberd 1.4.3 + mu-conference on the backend. I'd
like to add a status notification when a connected user begins typing
or drawing, so that the user's name in the roster list changes to
something like:
janet (drawing)
And I'm having some problems with this.
I've pondered doing this two ways: one in which I send a <message>
stanza that has a jabber:x:event attached to it. Something like:
<message to="room at conference.localhost" from="janet at localhost">
<x xmlns="jabber:x:event">
<composing/>
</x>
</message>
The other way I've pondered doing it is with <presence> notifications:
<presence to="room at conference.localhost" from "janet at localhost">
<status>drawing</status>
</presence>
Currently I'm trying to do it the second way.
Both ways seem to work; however, both ways will disconnect users.
>From the jabberd logs, it appeared that users were running up against
karma limits, so I changed the karma setting on the server so that
<dec> is 0. Still nothing. The only thing I know for sure is that
when I'm testing the client, and I'm disconnected, I get this in my
output:
<stream:error>Invalid XML</stream:error>
Now, as far as I can tell from my debug output, there's nothing wrong
with the XML generated by the XIFF libraries. The problem seems to
manifest most reliably when I click very rapidly on the whiteboard
(thus sending a bunch of <presence> notifications across the wire).
Any idea what I might be doing wrong here? How have other people
gotten these sorts of notifications to work?
Thanks,
Janet
More information about the JDev
mailing list