A common and convenient practise for new extensions is to supply a fallback in the body. This provides immediate backwards compatibility for naive clients, since - not understanding the new protocol - they will gracefully degrade to displaying the body as an instant message.
By way of example, a recent Reactions proposal suggested including the emoji as a <body/> element, so that existing clients would simply display it as a normal message.
The downside of this approach is that servers and other intermediaries treat the presence of a <body/> as being an indicator that a message is indeed an instant message. They may errornously treat a message this way for archival purposes, etc, that only has a <body/> for fallback purposes, which might not be appropriate.
This specification tackles the problem by providing an element to be used as a hint that parts or all of the supplied <body/> and <subject/> elements are for fallback purposes, and the message may be treated as if they were not present if the processing entity understands what the message is a fallback for.
Additionally, the specification allows for transporting information about which parts of a <body/> are used for fallback purposes and for which reason, such that supporting clients can hide or dim those parts when displaying them to the user or otherwise treat those parts special as intended or encouraged by other specifications.
Support for this protocol MAY be advertised by the Service Discovery protocol defined in Service Discovery (XEP-0030)
The fallback indicator is an element <fallback/> qualified by the urn:xmpp:fallback:0 namespace. It has an attribute
for that indicates the specification that the fallback is meant to replace. This is typically the primary namespace
of the respective specification, but may be specified otherwise. The <fallback/> element may have one or multiple
<body/> or <subject/> child elements, that indicate the part of the message, that is a fallback. Both
of these child elements may have a start and end attribute which point to the start and end of a fallback
character sequence as defined in Character counting in message bodies (XEP-0426)
A previous version of this specification had an example using an encrypted message. It is suggested to use Explicit Message Encryption (XEP-0380)
Receiving the above message, a naive client will naturally display the full <body/> element text, but a client which supports this specification and the specification for urn:xmpp:reply:0 will know that a part of the message is merely a fallback placeholder, and to ignore (and not display) that part, if it has other ways to convey the intended meaning.
]]>
This specification allows messages with a body (and real message content therein) to be treated by a server as if that body text does not exist. Servers MAY, particularly in a secure setting, wish to archive copies of the message even if they ordinarily would not archive a message with no body.
This XEP requires no interaction with the Internet Assigned Numbers Authority (IANA)
None.
The author wishes to share any credit with many members of the community.