Mastodon: Consider reintroducing mastodon:scope to AP

Created on 17 Nov 2018  路  17Comments  路  Source: tootsuite/mastodon

Pitch

Different ActivityPub implementations use to/cc addressing with different semantics. Reintroducing mastodon:scope would allow us to know what is explicitly intended to be a DM, followers-only post, etc.

Motivation

Hubzilla, Friendica, etc. allow for the possibility of sending a post directly to somebody in the to field, but that post may not actually be intended to be a DM, it may just be a post being shared directly with the user, who can then reshare the post.

Reintroducing mastodon:scope data would allow for us to have a better understanding of the intent of the post instead of guessing based on to/cc fields.

suggestion

Most helpful comment

can we just agree on directMessage flag for now? i don't want to deal with the w3c bureaucracy, we can put it in litepub namespace if you don't want to put it in toot. w3c can adopt it later if they want.

All 17 comments

Also a way to explicitly set boostability outside of the the implicit. The current semantics of the whole deal are really just something that Mastodon and Pleroma implement and everybody else just ignores because it's impossible to know how to implement without looking at Mastodon/Pleroma code

This describes exactly the dilemma we are currently having while developing AP for Friendica. We do have public and private posts - and separated from this we are having something like DMs. There is no standard way to separate a DM from a private post where someone had been mentioned - but we need it.

There had been a long discussion with no final result in an issue I created more than a year ago here: https://github.com/w3c/activitypub/issues/196

So if we all could agree upon a single way then I would been very glad.

The concept of having a new object type is attractive, but not workable because of Mastodon compatibility, which is unfortunate, that's why I think bringing back the scope field as, for example, toot:scope makes sense.

As long as there is some way to detect the differences, I'm totally open to everything, and this toot:scope would be one way. To make it more open, we also could create something under the litepub namespace.

@Gargron would you accept an PR for this? We (and also Friendica) are trying to plan how to solve this problem, and toot:scope would be the best approach for everyone.

I've highlighted the problem of differentiating targeted messages (like DM, e-mail) from privately broadcast messages (like G+ circles) to the AP design team early on, and unfortunately that didn't lead anywhere. We are currently using a somewhat unreliable, but better-than-nothing heuristic to do this: if the to/cc audience has more members than there are in the tag, then it's privately broadcast, otherwise it's a DM.

To some degree, I am content with that heuristic, as it works for the cases that we see in the wild today, and not very noticeable when it doesn't. On the other hand, I have vividly negative emotions towards our past usage of "mastodon:scope", however, I can see that it would be harmless if it's intent was purely presentational, and not related to access control. I would suggest that "scope" is maybe not the best keyword for something that is purely presentational, though.

So it sounds like there are a couple cross-cutting concerns here.

that post may not actually be intended to be a DM, it may just be a post being shared directly with the user, who can then reshare the post

Also a way to explicitly set boostability outside of the the implicit.

This sounds like the question is actually the visibility/interactability of the post, like is discussed in https://github.com/w3c/activitypub/issues/319 and #8565. I would also like to clear this up, but I don't think a "scope" enum is the correct way to do it


Separate from this we have Friendica's concerns:

We do have public and private posts - and separated from this we are having something like DMs.

The linked issue contains more details:

This is mostly meant for stuff that you just want to share with other people - and it doesn't really matter if all the receivers see the message at all.

The second one is more like the traditional mail. You not only get a notification about it, but also these messages are collected at a special place so that you can keep an eye on this. These messages can mostly be addressed to a group of people as well.

I think our current audience/mention tagging system is correct and appropriate for this, especially now that mastodon no longer requires Mention records for private posts (since #8950). Things that you are sharing with someone are just part of the activity's audience, and things that you get a notification for are Mention tags on the object. If we want to improve on this, maybe one way to do so is to use a different object type for "private messages" that are more like chat conversations/email/etc? I don't think there's one natively that fits, but a "Message" type might be useful.

This bug has nothing to do with that, it has to do with removing the use of heuristics and more directly stating the presentation intent. It has nothing to do with w3c/activitypub#319.

@kaniini i'm not sure i understand the comments about boostability in the OP & lain's response then. Are we expecting toot:scope to set boostability or not?

No, that's a secondary wishlist. We should handle that in w3c/activitypub#319, but that shouldn't block toot:scope for now.

Okay. Do you think the bits I quoted from https://github.com/w3c/activitypub/issues/196 accurately describe the design pleroma is looking to implement as well? Or are there differences? My concern with toot:scope being (private|direct|public|unlisted) is that I don't want to expose something so mastodon-specific into our activitypub API. What are your thoughts on a directMessage or directDelivery flag?

that's fine with me. we just want to be able to know, authoritatively, what the intent of the message is. directMessage or directDelivery flag would satisfy this requirement.

I'm fine with any flag, as long as there is a flag where most implementers agree upon.

Which name could be taken for this? Should this be an issue for https://github.com/w3c/activitypub?

Should this be an issue for https://github.com/w3c/activitypub?

Yes, I think so.

can we just agree on directMessage flag for now? i don't want to deal with the w3c bureaucracy, we can put it in litepub namespace if you don't want to put it in toot. w3c can adopt it later if they want.

can we just agree on directMessage flag for now?

Any news on this?

Was this page helpful?
0 / 5 - 0 ratings