On 15 Apr 2013 12:17, "Maninder Obhrai" <maninder.obh...@gamesys.co.uk>
wrote:
> We'd like to be able to tell whether a chat user in a room is on a mobile
device or a desktop device and we're trying to work out the best way to do
this. Our current plan involves making the client set the device type
(mobile/desktop) as part of the resource, and then exposing full JIDs to
all users. The client we've written can then parse this and show an icon
next to chat messages. We looked at PEP and it seems a little over the top,
and we didn't want to hack stuff into the presence status.

As Kev says, a disco#info request will give you the device type.

PEP won't work very smoothly because it works on a user-level, so you'd
have to stick a per-resource level over the top, somehow.

Hacking stuff into the presence stanza *will* work, and would be reasonable
if it weren't for disco#info already giving you that information. As it is,
XEP-0115 will allow you to hash the device type into the presence stanza,
and you can hardcode those hashes (ie, pre-fill the cache) to avoid any
lookup at all.

However, if you really want this to be per-message, and not per-occupant,
you're going to need to put the information (probably a XEP-0115 caps
element) into the message stanza. Whether or not this makes sense really
depends on whether you have nick-sharing going on or not, and whether you
want to spend the extra bandwidth.

Dave.
_______________________________________________
JDev mailing list
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
_______________________________________________

Reply via email to