Re: Federated/Distributed @mentions

How does this work when people put HTML as the content? Does this get
parsed before or after entities are parsed? What happens when agents that
see this as html don't parse them out?

You'd have to really lock down how to parse the content field and what
is/isn't acceptable there and what to do to remove ambiguity when you
actually want some of that syntax to be untouched.

I'd assume this isn't about routing. We have solutions for that. You just
tag the object with who is mentioned, who it is going to, what it is in
reply to, etc.

This is just about marking up the content, which can currently be in any
form? Right now, you'd just have "@foo" in your content, and the object
would have an array of mentions which you would use to map the username to
a domain and you would just mark it up as you need to. The convention is to
look for an @ sign, although we don't (nobody does) specify the valid
characters for a handle.

The only better way I can think of is not to enforce some new markup
language semantics within already arbitrary markup, but rather to just
simply place in that mentions array the position and length of the
substring in the content that represents the handle. Then I'd just replace
that substring with my markup, whatever that is for my purpose, or if I
don't care, I just display the content with whatever the publisher cared to
use ("<a></a>" tag, @foo, +foo, etc) and it would already be presentable.
Sooooo simple.

My basic thesis: it's not content, it's metadata. while the html
microformat folks can get away with it, it seems very out of place here.

(I admit I am not able to write AS2 just from memory)

{
  "content": "Hello @foo",
  "mentions": [{
    "type": "person",
    "url": "http://example.com/foo
    "displayName": "Foo Bar"
    "username": "foo",
    "mentionedAt": [6, 4]
  }]
}

I can then turn that into "Hello <a href='http://example.com/foo'>Foo
Bar</a>" or "Hello @<a href='http://example.com/foo'>foo</a>" or "Hello +<a
href='http://example.com/foo'>foo</a>" or whatever. Conversely, if it is
html in the content, the substring would be the entire anchor tag, maybe.
It would be very obvious that it would always indicate the position in the
content before any processing is done.

On Wed, Dec 3, 2014 at 2:14 PM, Matthew Marum <vp-projects@opensocial.org>
wrote:

> The use of @[id|label].
>
> Matt
>
> On 12/3/14, 12:48 PM, "James M Snell" <jasnell@gmail.com> wrote:
>
> >On Wed, Dec 3, 2014 at 9:25 AM, Matthew Marum
> ><vp-projects@opensocial.org> wrote:
> >[snip]
> >>
> >> "@[Users:seed_paul_id:Paul] can you please help with this opportunity?"
> >>
> >>
> >> The first two parts form a unique identifier within a Sugar instance and
> >> the final part is the display label.  Frankly, I’m not sure why we
> >> wouldn’t use the precedent that Twitter API has established here in
> >>terms
> >> of syntax.  I’ll leave any potential legal concerns to the lawyers.
> >>
> >
> >Which syntax specifically from the Twitter API?
> >
> >- James
>
>
>
>

Received on Wednesday, 3 December 2014 19:37:10 UTC