On Tue, 10 Mar 2026 18:47:05 +0100
Philipp Hörist <[email protected]> wrote:

> Hi,
> 
> Im a bit confused about begin/end
> 
> The XEP says
> 
> > If a mention element of type urn:xmpp:mentions:0 or its subtypes
> > contains both begin and end attributes, the receiving entity MAY
> > use this as a hint that the specified range of the content is being
> > addressed to the specified occupant.  
> 
> I dont think this is necessary, as its usual that the content that
> follows the mention is addressed to the mentioned user.
> 
> What was missing was that we can special format the nickname or the
> @admin @all etc in the GUI when we receive a message, without
> hardcoding some regex or scanning for nicknames.

The 'begin' and 'end' attributes specify the range of the
specially-formatted text. It is meant to be used to, for example,
pillify text like "@room" or "@romeo". Note that there can be multiple
mentions, and the content addressed to them isn't always what follows:
"@romeo, have you seen @juliet?" has two mentions, with ranges
specified for "@romeo" and "@juliet".
_______________________________________________
Standards mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to