On 09.04.2015 06:10, Mel Adamaitis wrote:
> Problem:
> 
> In an XMPP IM client we are working on, it is necessary for mentions of
> other users (for alerting, highlighting) to be based on a normalised
> user identity, but displayed in a denormalized human-readable format.
> Additionally, for a particular denormalized identity, there may be any
> number of normalised identities. For example, user j...@example.com
> <mailto:j...@example.com>should be mentioned as Joe Bloggs. The
> relationship between the normalized and denormalized identities is known
> by the client authoring the message, and must be transmitted with the
> message for appropriate display and behaviour on the receiving end.

I'm not sure if I would extend/modify xep71 for that use-case. If I had
the requirement I would probably first try to mark the String and assign
a semantic to the marked String by using an extra extension element:

<messageā€¦>
  <body>Hi Joe Bloggs. How are you?</body>
  <mark>
    <mention jid='j...@example.com'>
      <by-string string='Joe Bloggs'/>
    </mention>
  </mark>
</message>

This has a few advantages:
- It doesn't mess with xep71
- It also works with clients who do not support xep71, i.e. just 'body'
elements.
- It splits the marking and the "assign semantic to mark" in two
different tasks


The last point basically means that the features of this extension could
be diverse. While I'm not sure if it's really a good idea to use it for
for anything and everything, it's good to have the option: For example

<messageā€¦>
  <body>Welsh looks like this: TI'n gallu ysgrifennu Cymraeg, ydy./body>
  <mark>
    <audio url='http://soundsoftheworld.com/welsh.mp3'>
      <by-range start='23' end='56'/>
    </mention>
  </mark>
</message>

- Florian

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to