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

AT: Bridgy ignores self-applied sensitive content labels #1099

Closed
qazmlp opened this issue Jun 2, 2024 · 19 comments
Closed

AT: Bridgy ignores self-applied sensitive content labels #1099

qazmlp opened this issue Jun 2, 2024 · 19 comments
Labels

Comments

@qazmlp
Copy link

qazmlp commented Jun 2, 2024

This is the inverse of #1100.

I made this post with an image self-labelled as "Suggestive": https://bsky.app/profile/qazm.bsky.social/post/3ktwiogwras2s
(Note: You probably should have nudity set to at least "Warn" if you look at my account beyond that page.)
The post in question.

This was bridged to AP with no indication of sensitive content:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "attachment": [
    {
      "name": "A truncated screenshot of a dimly-lit purple SFD-modelled abstract knot-like shape above a background grid.",
      "type": "Image",
      "url": "https://morel.us-east.host.bsky.network/xrpc/com.atproto.sync.getBlob?did=did:plc:2shmwstgqmlu4ymg7ctjcdc7&cid=bafkreiejrmrtm43o6rqtorom6pd3dwgme5apte42ebxodn2hopgdcv2ixi"
    }
  ],
  "attributedTo": "https://bsky.brid.gy/ap/did:plc:2shmwstgqmlu4ymg7ctjcdc7",
  "content": "<p>(This is a test on how self-applied sensitive content labels are bridged.)</p>",
  "contentMap": {
    "en": "<p>(This is a test on how self-applied sensitive content labels are bridged.)</p>"
  },
  "content_is_html": true,
  "id": "https://bsky.brid.gy/convert/ap/at://did:plc:2shmwstgqmlu4ymg7ctjcdc7/app.bsky.feed.post/3ktwiogwras2s",
  "image": {
    "name": "A truncated screenshot of a dimly-lit purple SFD-modelled abstract knot-like shape above a background grid.",
    "type": "Image",
    "url": "https://morel.us-east.host.bsky.network/xrpc/com.atproto.sync.getBlob?did=did:plc:2shmwstgqmlu4ymg7ctjcdc7&cid=bafkreiejrmrtm43o6rqtorom6pd3dwgme5apte42ebxodn2hopgdcv2ixi"
  },
  "published": "2024-06-02T08:04:00.537Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "type": "Note",
  "url": "https://bsky.brid.gy/r/https://bsky.app/profile/did:plc:2shmwstgqmlu4ymg7ctjcdc7/post/3ktwiogwras2s"
}

Which of course means that the image isn't blurred-by-default on any ActivityPub platforms, unless the account is moderated by the receiving instance:

The post in question.


What I expected:

The post should have a sensitive content label applied like on this native AP post I just made:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        {
            "ostatus": "http://ostatus.org#",
            "atomUri": "ostatus:atomUri",
            "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
            "conversation": "ostatus:conversation",
            "sensitive": "as:sensitive",
            "toot": "http://joinmastodon.org/ns#",
            "votersCount": "toot:votersCount",
            "blurhash": "toot:blurhash",
            "focalPoint": {
                "@container": "@list",
                "@id": "toot:focalPoint"
            }
        }
    ],
    "id": "https://tiggi.es/users/Qazm/statuses/112546008212972221",
    "type": "Note",
    "summary": null,
    "inReplyTo": null,
    "published": "2024-06-02T08:09:59Z",
    "url": "https://tiggi.es/@Qazm/112546008212972221",
    "attributedTo": "https://tiggi.es/users/Qazm",
    "to": [
        "https://www.w3.org/ns/activitystreams#Public"
    ],
    "cc": [
        "https://tiggi.es/users/Qazm/followers"
    ],
    "sensitive": true,
    "atomUri": "https://tiggi.es/users/Qazm/statuses/112546008212972221",
    "inReplyToAtomUri": null,
    "conversation": "tag:tiggi.es,2024-06-02:objectId=15943322:objectType=Conversation",
    "content": "<p>(This is a test on how self-applied sensitive content labels are bridged.)</p>",
    "contentMap": {
        "en": "<p>(This is a test on how self-applied sensitive content labels are bridged.)</p>"
    },
    "attachment": [
        {
            "type": "Document",
            "mediaType": "image/jpeg",
            "url": "https://tiggi.es/system/media_attachments/files/112/546/004/838/492/972/original/141e2f46f5601539.jpg",
            "name": "A truncated screenshot of a dimly-lit purple SFD-modelled abstract knot-like shape above a background grid.",
            "blurhash": "Uc7,?0axI%oNs?j[W9axaxj]ayaxoNaxWTj]",
            "focalPoint": [
                0,
                0
            ],
            "width": 3000,
            "height": 1000
        }
    ],
    "tag": [],
    "replies": {
        "id": "https://tiggi.es/users/Qazm/statuses/112546008212972221/replies",
        "type": "Collection",
        "first": {
            "type": "CollectionPage",
            "next": "https://tiggi.es/users/Qazm/statuses/112546008212972221/replies?only_other_accounts=true&page=true",
            "partOf": "https://tiggi.es/users/Qazm/statuses/112546008212972221/replies",
            "items": []
        }
    }
}

This results in blurring the image:
The post in question.
(I'm not sure if this is an image blur or just the blurhash… Ideally Bridgy should compute the blurhash to make sure the post still looks good in AP software.)

For higher categories of labels, i.e. "Nudity" or "Porn" instead of just "Sensitive", Bridgy should additionally use those terms or "Label: Nudity"/"Label: Porn" as CW/CN so that users can filter on them!

@snarfed
Copy link
Owner

snarfed commented Jun 2, 2024

Great feature request! I don't know much about the as:sensitive AS2 extension - assuming it is an extension at all, and not just a misuse of a field like Mastodon putting CWs into summary - but I can learn!

@snarfed
Copy link
Owner

snarfed commented Jun 2, 2024

Also hopefully I can do this without actually calculating a real blurhash. That would be possible, but very low priority right now.

@qazmlp
Copy link
Author

qazmlp commented Jun 2, 2024

Great feature request! I don't know much about the as:sensitive AS2 extension - assuming it is an extension at all, and not just a misuse of a field like Mastodon putting CWs into summary - but I can learn!

It's namespace misuse, I'd say. Afaik apps aren't supposed to define new terms for the core namespace, but Mastodon does so in a few cases: https://docs.joinmastodon.org/spec/activitypub/#as

Also hopefully I can do this without actually calculating a real blurhash. That would be possible, but very low priority right now.

The details probably depend on the receiving instance a bit, but at worst it should result in an indistinct placeholder. Anything worse I'd file as a bug on their end.

@jfietkau
Copy link

jfietkau commented Jun 2, 2024

There is a draft report by @evanp that aims to formally document some loose ends, including as:sensitive.

@qazmlp
Copy link
Author

qazmlp commented Jun 4, 2024

Just my two cents, but I thought about it a bit and if you do end up adding CNs/CWs, the ones I'd most like to see are:

  • Adult Content: Nudity
  • Adult Content: Porn

Mirroring the "Adult Content" click-through that Bsky shows but with a bit more specificity. This would also get picked up by AP users' existing word filters for "nudity", "porn" and "adult content", but at the same time is unique enough that filtering "Adult Content: Nudity" and "Adult Content: Porn" would hit more or less only Bsky posts in case someone wants to hide those specifically.

@qazmlp
Copy link
Author

qazmlp commented Jun 5, 2024

Maybe an interesting complication: On Bluesky, "Sensitive" can also be applied to posts with link preview attachments.
Mastodon does not have this option when composing posts, so when receiving a sensitive post without (other) media, it's possible that it would still show a preview there.

If it does, it might be a good idea to suppress the preview there or apply "Adult Content: Sensitive" as CN/CW only when there's no bridged images/videos.

@qazmlp
Copy link
Author

qazmlp commented Jul 12, 2024

Just a small nudge that there are now a few bridged-from-Bluesky users who occasionally post adult content themselves.
Might become an issue if someone from a huge instance follows them and they appear on the federated feed there.

(Admins can still limit their visibility manually once aware, but unlike on Bluesky there's usually no automatic classifier.)

@snarfed
Copy link
Owner

snarfed commented Jul 15, 2024

@snarfed snarfed closed this as completed Jul 15, 2024
@qazmlp
Copy link
Author

qazmlp commented Jul 15, 2024

Mostly there (in my eyes), but this doesn't seem to apply content notes/CWs for the higher levels, which most general-purpose instances require. There are some purpose-built instances for adult content that only require the 'sensitive' label, but those are usually limited in visibility via instance moderation elsewhere.

Example thread on Bluesky.
I don't know how to easily get the AP id for these. Might be neat to have a button to copy it in the event log on the bridge's account status page, eventually.

@snarfed
Copy link
Owner

snarfed commented Jul 15, 2024

Thanks! And understood.

content notes/CWs for the higher levels, which most general-purpose instances require

Any chance you have a link with more info on this?

@qazmlp
Copy link
Author

qazmlp commented Jul 15, 2024

Thanks! And understood.

content notes/CWs for the higher levels, which most general-purpose instances require

Any chance you have a link with more info on this?

It's (by the nature of the network) inconsistent of course, and the remark was admittedly based on my subjective experience in it.

I can make a table of the largest instances, since this is listed publicly in their rules...

instance (rules page) notes requirement for sexual content requirement for violent content
mastodon.social - sensitive or CW sensitive or CW
misskey.io In Japanese. I think it's similar to mastodon.social's with Japan-specific legal requirements. sensitive is enough? R-18G-rated violence is banned
mstdn.jp (in the About section, not Rules) In Japanese. Something along the lines of "please use descriptive CWs according to common sense", though CWs may not be required for NSFW image-only posts while the media is flagged. descriptive CW? descriptive CW?
mastodon.cloud Rules aren't public. ? ?
mstdn.social - sensitive flag sensitive flag
mastodon.online - sensitive or CW sensitive or CW
mastodon.world - CW CW, with exceptions that are banned
mas.to - sensitive and/or CW unspecific (likely the same)
micro.blog Nothing specific. none? none?
lemmy.world Unspecific regarding sexual content. none? NSFW tag (which I think is "sensitive", but I'm not certain.)

You're right, only two of the top ten require a CW specifically. "sensitive" is likely enough for threads.net too, but I assume they'll just filter out those posts completely over there.

I think furry servers are just largely more strict about this. The ones listed on joinmastodon.org:

instance (rules page) notes requirement for sexual content requirement for violent content
bark.lgbt - CW CW
furry.engineer - CW CW
pawb.fun - CW CW
furries.club "should" sensitive flag + descriptive CW sensitive flag + descriptive CW
cyberfurz.social Not specific regarding violence. CW probably CW?
furry.energy - sensitive flag, + CW for some sensitive flag, + CW for some

(The LGBTQ+ category is a bit more lax about this, I think only about half the servers there require CWs specifically (or ban adult content outright).)

In practice, I personally don't see sexually explicit content without CW on Mastodon, which is convenient because it lets me show sensitive media by default (so suggestive stuff) while I can decide if I want to see porn or violence on a case-by-case basis, or filter it outright based on keywords. (I have a filter for "porn" on my main account, but Bluesky users usually don't write "porn" in the post or alt text in addition to the label, so my filter wouldn't work. The word filter does trigger on CWs.)


Something else to consider is that the CW/summary-UX in ActivityPub apps is usually not obtrusive:

software CW notes
Mastodon The post content has a line with the summary text and a SHOW MORE button next to it, formatted like post text. The CW is formatted like text content and doesn't collapse images.

Text and images are revealed independently.
Pixelfed Pixelfed CW vs. sensitive The first post has a CW, the second is only marked sensitive.

The CW only replaces the "This post may contain sensitive content." copy with the summary.

Either hides all text content unless expanded. Clicking "See Post" shows both image and text content together.

(I don't have a Misskey account to test this with currently, but from screenshots it seems to be like Mastodon.)

I think this actually enhances the presentation compared to not applying a CW.
On Pixelfed always, of course, and on Mastodon definitely if the post has otherwise no text.

Personally, I would prefer a CW with the label category even for posts that have text, since if I look at the adult-flagged posts on Bluesky, the text is usually not very descriptive in that way. It's more often than not stuff like "Care to join?" (okay, that's predictable), "View", "yea" or just the character name or commissioner, which makes what I'm about to see a guessing game if the label category isn't visible.

CWs and sensitive media can also be independently set to always expand or show in Mastodon, if a user prefers to always see the text, though I personally didn't do so because I'm not always in the mood for heavier posts:
The relevant settings, showing three options for media (also "hide all") and a checkbox for CWs.

@qazmlp
Copy link
Author

qazmlp commented Jul 15, 2024

Basically, among the label types that Bridgy Fed understands, I would like to see CWs for all except whichever the one is that Bluesky calls 'Adult Content - Sensitive' in their self-labelling UI. That one seems to be used only for very tame content that I wouldn't expect a separate CW on on Mastodon even in my context, and it seems to usually be paired with a bit more useful descriptions in the text content on Bluesky.

For the other Adult Content categories I'd prefer "Adult Content: Nudity" and "Adult Content: Porn" as CWs as mentioned here.

The others should probably match Bluesky's warnings if you see them (so "Graphic Media" for 'graphic-media', I think?), but I don't think Bridgy Fed can currently receive them from the Bluesky PDS since they aren't self-applicable.

I have a hunch you might want to outright filter out or Delete posts that end up labelled 'nsfl' instead of just putting a CW on those, but I feel strongly unmotivated to find out what that category actually is used for.


Edit:

I think if you later add support for the moderation labels from the Bluesky Moderation Service, i.e. third-party labels, those should probably appear with the labeller that applied them, so for example the bridge would edit a post to have "Bluesky Moderation Service: Misinformation" as CW if that gets applied.

@snarfed
Copy link
Owner

snarfed commented Jul 15, 2024

Thank you for the detailed investigation and context! As always. I really appreciate it.

I'm a bit torn on adding CWs. I try hard to avoid/minimize changing users' content itself, which CWs in one sense feel like, since they're user-authored and go into the AS2 summary field. (Which is generally agreed now to be a misuse of that field, so maybe that's less an argument.) On the other hand, Bluesky self labels are also a form of user authoring, and they're rendered and used similarly to CWs, so maybe in this case it's the right idea.

(Btw, unrelated nit: looking at your catalog of instance rules, my interpretation is that they apply to those instances' own users, not all users on the fediverse, right? Are you saying admins generally apply those same rules to remote users and posts, ie as their moderation policies?)

@qazmlp
Copy link
Author

qazmlp commented Jul 15, 2024

Thank you for the detailed investigation and context! As always. I really appreciate it.

I'm a bit torn on adding CWs. I try hard to avoid/minimize changing users' content itself, which CWs in one sense feel like, since they're user-authored and go into the AS2 summary field. (Which is generally agreed now to be a misuse of that field, so maybe that's less an argument.) On the other hand, Bluesky self labels are also a form of user authoring, and they're rendered and used similarly to CWs, so maybe in this case it's the right idea.

I think that removing them is stronger alteration, when taking into account the different filter choice mechanisms between the networks.

I can see where you're coming from in not using third-party labels, to an extent, though in the (far) future it might be nice if instance admins could "subscribe" to certain labellers through Bridgy Fed and then see the content through that lens when using authorized fetch from their instance.

(Btw, unrelated nit: looking at your catalog of instance rules, my interpretation is that they apply to those instances' own users, not all users on the fediverse, right? Are you saying admins generally apply those same rules to remote users and posts, ie as their moderation policies?)

Yes and no, kinda. The rules are generally more lenient regarding other instances, but they also influence which posts may be boosted by users on that instance (with a visibility above followers-only, at least). For example, if my instance requires a CW on nudity, then I generally shouldn't boost nudity that doesn't have one.

The rules also inform which other instances certain instances will share a relay with, since that causes the discovery feeds to be merged. Conversely, if there's a large difference, admins may remove individual users or an instance from the discovery feeds on their instance. In practice:
image
image

These are from the mod lists of two instances I have accounts on.
I don't think my admin on the latter would have defederated the instance for lack of CWs alone, but it's often taken into account to some extent, in my experience with a few instances other than these two.

@snarfed snarfed reopened this Jul 16, 2024
@snarfed
Copy link
Owner

snarfed commented Jul 16, 2024

OK! I can plan to translate Bluesky self labels to fediverse CWs. And I'll look at "Adult Content - Sensitive" and see if it's worth excluding.

@qazmlp
Copy link
Author

qazmlp commented Jul 16, 2024

I appreciate it. This will definitely make (re)connecting with friends across the bridge a much smoother experience for me, and for them also I imagine (in terms of not having to worry about small-instance Mastodon culture as much).

@snarfed
Copy link
Owner

snarfed commented Jul 17, 2024

OK, this is done. All Bluesky self labels now get translated to fediverse content warnings. No exceptions yet, let's see how it goes and what we think?

Example: https://bsky.app/profile/did:plc:3ljmtyyjqcjee2kpewgsifvb/post/3kxgt3rrroc22 => https://indieweb.social/@snarfed.bsky.social@bsky.brid.gy/112798919768121532

@snarfed snarfed closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants