jabber:x:envelope
The jabber:x:envelope namespace describes
more complex message-addressing details than the simple
from and to attributes in the
<message/> elements.
The first area in which this namespace is used is in server-side filtering,
a service provided by the JSM’s mod_filter module. For example, when a user sets a filter rule to forward all messages to someone else
while he’s not around:[8]
<rule name='absent'> <show>xa</show> <forward>john@company-b.com</forward> </rule>
a message such as this:
<message id='284' to='janet@company-b.com'> <body>Can you give me the sales figures for last quarter?</body> </message>
will be passed on to john@company-b.com in this form:
<message id='284' to='janet@company-b.com'>
<body>Can you give me the sales figures for last quarter?</body>
<x xmlns='jabber:x:envelope'>
<forwardedby jid='janet@company-b.com'>
<from jid='mark@company-b.com'>
<cc jid='john@company-b.com'>
</x>
</message>
to add context information on where the message has come from.
[8] The filter service is described in Section 4.4.3.1 in Chapter 4.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access