Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider reintroducing mastodon:scope to AP #9300

Open
kaniini opened this issue Nov 17, 2018 · 21 comments
Open

Consider reintroducing mastodon:scope to AP #9300

kaniini opened this issue Nov 17, 2018 · 21 comments
Labels
activitypub Protocol-related changes, federation suggestion Feature suggestion

Comments

@kaniini
Copy link
Contributor

kaniini commented Nov 17, 2018

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.

@lambadalambda
Copy link

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

@annando
Copy link

annando commented Nov 18, 2018

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: w3c/activitypub#196

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

@kaniini
Copy link
Contributor Author

kaniini commented Nov 19, 2018

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.

@annando
Copy link

annando commented Nov 19, 2018

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 Gargron added the suggestion Feature suggestion label Nov 20, 2018
@kaniini
Copy link
Contributor Author

kaniini commented Nov 25, 2018

@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.

@Gargron
Copy link
Member

Gargron commented Nov 25, 2018

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.

@nightpool
Copy link
Member

nightpool commented Nov 25, 2018

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 w3c/activitypub#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.

@kaniini
Copy link
Contributor Author

kaniini commented Nov 25, 2018

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.

@nightpool
Copy link
Member

@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?

@kaniini
Copy link
Contributor Author

kaniini commented Nov 25, 2018

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

@nightpool
Copy link
Member

Okay. Do you think the bits I quoted from w3c/activitypub#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?

@kaniini
Copy link
Contributor Author

kaniini commented Nov 25, 2018

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.

@annando
Copy link

annando commented Nov 25, 2018

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

@annando
Copy link

annando commented Nov 26, 2018

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

@Gargron
Copy link
Member

Gargron commented Nov 26, 2018

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

Yes, I think so.

@kaniini
Copy link
Contributor Author

kaniini commented Nov 26, 2018

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.

@git-marijus
Copy link

can we just agree on directMessage flag for now?

Any news on this?

@trwnh
Copy link
Member

trwnh commented Nov 24, 2022

what if there was an activity type called Message and you didn't need to wrap it in a Create

id: ...
actor: alice
type: Message
to: bob
content: hello bob

as expressed above it is an IntransitiveActivity, but you could also Message a room or conversation of some sort?

id: ...
actor: https://alice.social
type: Message
object: https://alice.social/conversations/1
to: https://bob.social
content: hello bob
id: ...
actor: https://alice.social
type: Message
object: https://alice.social/rooms/1
to: https://alice.social/rooms/1/audience
content: hello world

it might be better to keep it intransitive though and use context instead of object

@lanodan
Copy link
Contributor

lanodan commented Nov 25, 2022 via email

@trwnh
Copy link
Member

trwnh commented Nov 25, 2022

It's still a valid issue even if it's 4 years old. litepub:directMessage is inelegant and depends on Create Note semantics, which can be confused for posting a status. ChatMessage is basically the same as a Note, it still depends on an unnecessary Create. What I'm proposing is specifically a new sub-type of Activity, not just an object -- this cuts down on duplication.

@kaniini
Copy link
Contributor Author

kaniini commented Nov 25, 2022

I don’t understand why this duplication is a problem with Mastodon’s data model? And directMessage can be placed directly on a Note.

@trwnh trwnh added the activitypub Protocol-related changes, federation label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub Protocol-related changes, federation suggestion Feature suggestion
Projects
None yet
Development

No branches or pull requests

8 participants