Chat Message Extensions

I noticed that the Spark client has a feature whereby one can send an alert to another user to get their attention. After a little digging I discovered that they are simply sending a normal chat message containing an extension called buzz, but with no actual message text. The Spark client apparently delivers the alert rather than posting the chat message to the chat room when it sees the buzz extension.

I have a need to do something similar. I want to be able to send messages to the chat client (which is really just embedded in my larger application) to do things like display and hide certain user interface controls, highlight things on the UI, possibly display special messages broadcast by a moderator in a special location on the UI, etc. I am thinking that just adding extensions to the normal chat message might be easier then using custom IQ messages which would also require me to write a plugin for OpenFire, etc. Has anyone done this in XIFF? Can someone give me a few pointers about where I need to make changes to add my own extension of this type? I’m surfing the source code now trying to figure it out, but any help would be appreciated.

Also, if you see any reason that this is not a good idea, please let me know that as well. Thanks.

There’s actually an experimental XEP for buzz, which you can find at http://www.xmpp.org/extensions/xep-0224.html (or you could if xmpp.org wasn’t down right now )

Yeah. What’s up with XMPP.org? It has been down for several days. I even sent an email to the technical support contact for the domain, but I got no response. In this case, I’m not sure the specification would help me much since I’m more interested in how to implement the extension in XIFF than in the specifics of how the buzz feature is implemented. I’m starting to get some idea as I look more closely at the source, but I would still be thrillied if someone has done this and could provide a quick summary of what needs to be added, changed, extended, etc. to add an extension to the messages.

I have managed to get a test extension working, at least a relatively simple one. As nearly as I can tell, this mechanism is sufficient to support my needs … that is, to deliver messages from some controller/moderator application to all other participants in the chat room. I may investigate the IQ mechanism as well, but it seems to me more difficult since I think I would have to write a plugin for the server to handle the new type of IQ … and I haven’t really been able to identify any advantage of using an IQ over what I’m doing now … i.e. just adding extensions to a plain old chat message.

There is something a little unsatisfying about putting something that is clearly not chat in a chat message … whereas IQ messages seem to have been intended to be more general purpose … but I can’t identify any problems so far with doing so. I know I’ve asked this before, but if anyone else has any thoughts on why I should or should not be choosing one method or the other, I’d be interested in hearing them.