Automattic / Automattic/wordpress-activitypub

Federated comments: images attached to mention are not saved in local comment

Open
#1,852 16 comments 1 reaction 0 assignees View on GitHub
[Feature] Federated comments [Pri] Low Triaged
Dominant language
PHP
Stars
579
Forks
92
Avg merge
13h 5m
Merged PRs (30d)
85

Description

### Quick summary

When someone replies to one of your posts and includes an image in their reply, that image will not appear in the local comment you receive on your site.

### Steps to reproduce

1. Publish a post on an ActivityPub-enabled site.
2. Have someone reply to that post from a Mastodon account, for example.
3. In their reply, they should include an image.
* In the ActivityPub representation of that reply, you will see an `attachment` key with information about the image that was sent.
4. Check the comment that was saved on your site based on that reply
* It will not include the image.

### Site owner impact

Fewer than 20% of the total website/platform users

### Severity

Minor

### What other impact(s) does this issue have?

_No response_

### If a workaround is available, please outline it here.

Here is an example:

- Original post: https://herve.bzh/wordpress-wordland-and-the-open-web/
- Reply on the Fediverse: https://mastodon.social/@wpcommaven/114737070053878940
- ActivityPub representation of that reply:
Details

```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"ostatus": "[http://ostatus.org#](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://mastodon.social/users/wpcommaven/statuses/114737070053878940",
"type": "Note",
"summary": null,
"inReplyTo": "https://herve.bzh/?p=128456",
"published": "2025-06-24T07:05:49Z",
"url": "https://mastodon.social/@wpcommaven/114737070053878940",
"attributedTo": "https://mastodon.social/users/wpcommaven",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://mastodon.social/users/wpcommaven/followers",
"https://herve.bzh/author/jeremy/",
"https://mastodon.social/users/davew"
],
"sensitive": false,
"atomUri": "https://mastodon.social/users/wpcommaven/statuses/114737070053878940",
"inReplyToAtomUri": "https://herve.bzh/?p=128456",
"conversation": "tag:mastodon.social,2025-06-23:objectId=1030709232:objectType=Conversation",
"content": "\u003cp\u003e\u003cspan class=\"h-card\" translate=\"no\"\u003e\u003ca href=\"https://herve.bzh/author/jeremy/\" class=\"u-url mention\"\u003e@\u003cspan\u003ejeremy\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e \u003cspan class=\"h-card\" translate=\"no\"\u003e\u003ca href=\"https://mastodon.social/@davew\" class=\"u-url mention\"\u003e@\u003cspan\u003edavew\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e Interesting and thanks for this, Dave. \u003c/p\u003e\u003cp\u003eI did a quick (OK, maybe not so quick) post on a standalone private test site. Who can I invite as an Editor to see the results? (And thanks for taking my mind off \u0026quot;things\u0026quot;.)\u003c/p\u003e",
"contentMap": {
"en": "\u003cp\u003e\u003cspan class=\"h-card\" translate=\"no\"\u003e\u003ca href=\"https://herve.bzh/author/jeremy/\" class=\"u-url mention\"\u003e@\u003cspan\u003ejeremy\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e \u003cspan class=\"h-card\" translate=\"no\"\u003e\u003ca href=\"https://mastodon.social/@davew\" class=\"u-url mention\"\u003e@\u003cspan\u003edavew\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e Interesting and thanks for this, Dave. \u003c/p\u003e\u003cp\u003eI did a quick (OK, maybe not so quick) post on a standalone private test site. Who can I invite as an Editor to see the results? (And thanks for taking my mind off \u0026quot;things\u0026quot;.)\u003c/p\u003e"
},
"attachment": [
{
"type": "Document",
"mediaType": "image/jpeg",
"url": "https://files.mastodon.social/media_attachments/files/114/737/052/547/540/173/original/75b1722d6a7de354.jpg",
"name": "An experimental test post written in Dave Winer's WordLand posting app. Truncated image showing an editing box with tool bars, the writing box and and part of an inserted image. ",
"blurhash": "UcQ9=tay%Nt7_4WBM_ayM_j[a#ay%MWBRjay",
"focalPoint": [
0.0,
0.0
],
"width": 800,
"height": 514
}
],
"tag": [
{
"type": "Mention",
"href": "https://herve.bzh/author/jeremy/",
"name": "@jeremy@herve.bzh"
},
{
"type": "Mention",
"href": "https://mastodon.social/users/davew",
"name": "@davew"
}
],
"replies": {
"id": "https://mastodon.social/users/wpcommaven/statuses/114737070053878940/replies",
"type": "Collection",
"first": {
"type": "CollectionPage",
"next": "https://mastodon.social/users/wpcommaven/statuses/114737070053878940/replies?only_other_accounts=true\u0026page=true",
"partOf": "https://mastodon.social/users/wpcommaven/statuses/114737070053878940/replies",
"items": []
}
},
"likes": {
"id": "https://mastodon.social/users/wpcommaven/statuses/114737070053878940/likes",
"type": "Collection",
"totalItems": 0
},
"shares": {
"id": "https://mastodon.social/users/wpcommaven/statuses/114737070053878940/shares",
"type": "Collection",
"totalItems": 0
}
}
```

- Locally saved comment:
Details

```
+----------------------+-------------------------------------------------------+
| Field | Value |
+----------------------+-------------------------------------------------------+
| comment_ID | 3063 |
| comment_post_ID | 128456 |
| comment_author | Jen T 🎗 |
| comment_author_email | wpcommaven@mastodon.social |
| comment_author_url | https://mastodon.social/@wpcommaven |
| comment_author_IP | xxx.xx.xxx.xx |
| comment_date | 2025-06-24 09:05:50 |
| comment_date_gmt | 2025-06-24 07:05:50 |
| comment_content |

@jeremy @davew Interesting and than |
| | ks for this, Dave.

I did a quick (OK, maybe no |
| | t so quick) post on a standalone private test site. W |
| | ho can I invite as an Editor to see the results? (And |
| | thanks for taking my mind off "things".) |
| comment_karma | 0 |
| comment_approved | 1 |
| comment_agent | Mastodon/4.4.0-nightly.2025-06-21 (http.rb/5.3.1; +ht |
| | tps://mastodon.social/) |
| comment_type | comment |
| comment_parent | 0 |
| user_id | 0 |
| url | https://mastodon.social/@wpcommaven/11473707005387894 |
+----------------------+-------------------------------------------------------+
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.