Link to paywalled posts from ActivityPub minds#4317
Ticket(s) / Related Merge Requests
minds#4317
Summary of Changes
Add link back to membership posts along with titles if present when sending via ActivityPub.
Testing Considerations
Hit /api/activitypub/users/1285556899399340038/outbox
with your user guid to see your ActivityPub outbox - it may take some time to update.
-
Make a text post and check the data is correct. -
Make a media post with text and title and check the content is correct. -
Make a membership post with text and title - you should only see the title and a link back to the content. -
Make a membership post with just text - you should see a link back to the content.
Behavior confirmed with @markharding on how the titles, urls and text are handled.
Deployment Considerations
Standard deployment - will be going to runners.
Regression Scope
ActivityPub egress.
Platform Affected (web, mobile, etc)
Web.
Developer Testing Completed
Manual.
Screenshots / Screen Recording
Testing against Mastodons ingress, locally.
simplescreenrecorder-2023-09-22_11.20.32
Text post
{
"type": "Create",
"actor": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"object": {
"type": "Note",
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551918482075947011",
"attributedTo": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"content": "111111111111",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/followers"
],
"tag": [],
"url": "https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551918482075947011",
"published": "2023-09-22T11:29:58+00:00",
"source": {
"content": "111111111111",
"mediaType": "text/plain"
}
},
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551918482075947011/activity"
}
Media post with text and title
{
"type": "Create",
"actor": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"object": {
"type": "Note",
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551918871231860752",
"attributedTo": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"content": "Text and title - title\u003Cbr /\u003EText and title - body",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/followers"
],
"tag": [],
"url": "https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551918871231860752",
"published": "2023-09-22T11:31:31+00:00",
"attachment": [
{
"type": "Document",
"url": "https://feat-act-pub-members-m4317.oke.minds.io/fs/v1/thumbnail/1551918826919038977/xlarge/",
"mediaType": "image/jpeg",
"height": 157,
"width": 322
}
],
"source": {
"content": "Text and title - title\nText and title - body",
"mediaType": "text/plain"
}
},
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551918871231860752/activity"
}
Membership media post with text and title
{
"type": "Create",
"actor": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"object": {
"type": "Note",
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551919707454443537",
"attributedTo": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"content": "membership post text and title - title\u003Cbr /\u003E\u003Ca href=\"https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919707454443537\" target=\"_blank\"\u003Ehttps://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919707454443537\u003C/a\u003E",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/followers"
],
"tag": [],
"url": "https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919707454443537",
"published": "2023-09-22T11:34:50+00:00",
"source": {
"content": "membership post text and title - title\nhttps://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919707454443537",
"mediaType": "text/plain"
}
},
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551919707454443537/activity"
}
Membership media post with just text
{
"type": "Create",
"actor": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"object": {
"type": "Note",
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551919785745322000",
"attributedTo": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537",
"content": "<a href=\"https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919785745322000\" target=\"_blank\">https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919785745322000</a>",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/followers"
],
"tag": [],
"url": "https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919785745322000",
"published": "2023-09-22T11:35:09+00:00",
"source": {
"content": "https://feat-act-pub-members-m4317.oke.minds.io/newsfeed/1551919785745322000",
"mediaType": "text/plain"
}
},
"id": "https://feat-act-pub-members-m4317.oke.minds.io/api/activitypub/users/991463054707265537/entities/urn:activity:1551919785745322000/activity"
}
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out
Edited by Ben