RFC3921 section 2.2.2.1 defines that the OPTIONAL <show/>
element MUST be one of the following:
away -- The entity or resource is temporarily away.
chat -- The entity or resource is actively interested in chatting.
dnd -- The entity or resource is busy (dnd = "Do Not Disturb").
xa -- The entity or resource is away for an extended period (xa = "eXtended Away").
I want to customise this list of available statuses by removing "chat" and adding additional statuses that XMPP clients can select from.
Before going too far down this road, I would like to know from the experts:
1) Can the list of standard elements be modified in ejabberd, and if so what's the best way of doing this?
2) Can the elements be changed on a per-virtualhost basis as each organisation wants a slightly different set of statuses (i.e. can see each others presence)?
3) Will XMPP clients pick up any changes to the elements list in ejabberd, or do they generally have the standard elements hardcoded?
4) What would happen if contact in one virtualhost has a element selected that is not available to a contact in another virtualhost, but the two contacts are connected?
Appreciate any input you can share.
ejabberd does not care about those show value. However, if you change then, your client is not XMPP compliant anymore.
It would be much better to use the status to convey the special meaning that you need and keeps mapping those status values on top of the standard "show" values.
If you also need to use the status, you can always add your own custom extension tag to pass the extra information needed by your client.