Merge branch 'feature/521-pinned-post-federation' into 'develop'
Pinned posts federation Closes #521 See merge request pleroma/pleroma!3312
This commit is contained in:
commit
79376b4afb
41 changed files with 1465 additions and 127 deletions
39
test/fixtures/mastodon/collections/featured.json
vendored
Normal file
39
test/fixtures/mastodon/collections/featured.json
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://{{domain}}/schemas/litepub-0.1.jsonld",
|
||||
{
|
||||
"@language": "und"
|
||||
}
|
||||
],
|
||||
"id": "https://{{domain}}/users/{{nickname}}/collections/featured",
|
||||
"orderedItems": [
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://{{domain}}/schemas/litepub-0.1.jsonld",
|
||||
{
|
||||
"@language": "und"
|
||||
}
|
||||
],
|
||||
"actor": "https://{{domain}}/users/{{nickname}}",
|
||||
"attachment": [],
|
||||
"attributedTo": "https://{{domain}}/users/{{nickname}}",
|
||||
"cc": [
|
||||
"https://{{domain}}/users/{{nickname}}/followers"
|
||||
],
|
||||
"content": "",
|
||||
"id": "https://{{domain}}/objects/{{object_id}}",
|
||||
"published": "2021-02-12T15:13:43.915429Z",
|
||||
"sensitive": false,
|
||||
"source": "",
|
||||
"summary": "",
|
||||
"tag": [],
|
||||
"to": [
|
||||
"https://www.w3.org/ns/activitystreams#Public"
|
||||
],
|
||||
"type": "Note"
|
||||
}
|
||||
],
|
||||
"type": "OrderedCollection"
|
||||
}
|
||||
47
test/fixtures/statuses/masto-note.json
vendored
Normal file
47
test/fixtures/statuses/masto-note.json
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"@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"
|
||||
}
|
||||
],
|
||||
"id": "https://example.com/users/{{nickname}}/statuses/{{status_id}}",
|
||||
"type": "Note",
|
||||
"summary": null,
|
||||
"inReplyTo": null,
|
||||
"published": "2021-02-24T12:40:49Z",
|
||||
"url": "https://example.com/@{{nickname}}/{{status_id}}",
|
||||
"attributedTo": "https://example.com/users/{{nickname}}",
|
||||
"to": [
|
||||
"https://www.w3.org/ns/activitystreams#Public"
|
||||
],
|
||||
"cc": [
|
||||
"https://example.com/users/{{nickname}}/followers"
|
||||
],
|
||||
"sensitive": false,
|
||||
"atomUri": "https://example.com/users/{{nickname}}/statuses/{{status_id}}",
|
||||
"inReplyToAtomUri": null,
|
||||
"conversation": "tag:example.com,2021-02-24:objectId=15:objectType=Conversation",
|
||||
"content": "<p></p>",
|
||||
"contentMap": {
|
||||
"en": "<p></p>"
|
||||
},
|
||||
"attachment": [],
|
||||
"tag": [],
|
||||
"replies": {
|
||||
"id": "https://example.com/users/{{nickname}}/statuses/{{status_id}}/replies",
|
||||
"type": "Collection",
|
||||
"first": {
|
||||
"type": "CollectionPage",
|
||||
"next": "https://example.com/users/{{nickname}}/statuses/{{status_id}}/replies?only_other_accounts=true&page=true",
|
||||
"partOf": "https://example.com/users/{{nickname}}/statuses/{{status_id}}/replies",
|
||||
"items": []
|
||||
}
|
||||
}
|
||||
}
|
||||
27
test/fixtures/statuses/note.json
vendored
Normal file
27
test/fixtures/statuses/note.json
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://example.com/schemas/litepub-0.1.jsonld",
|
||||
{
|
||||
"@language": "und"
|
||||
}
|
||||
],
|
||||
"actor": "https://example.com/users/{{nickname}}",
|
||||
"attachment": [],
|
||||
"attributedTo": "https://example.com/users/{{nickname}}",
|
||||
"cc": [
|
||||
"https://example.com/users/{{nickname}}/followers"
|
||||
],
|
||||
"content": "Content",
|
||||
"context": "https://example.com/contexts/e4b180e1-7403-477f-aeb4-de57e7a3fe7f",
|
||||
"conversation": "https://example.com/contexts/e4b180e1-7403-477f-aeb4-de57e7a3fe7f",
|
||||
"id": "https://example.com/objects/{{object_id}}",
|
||||
"published": "2019-12-15T22:00:05.279583Z",
|
||||
"sensitive": false,
|
||||
"summary": "",
|
||||
"tag": [],
|
||||
"to": [
|
||||
"https://www.w3.org/ns/activitystreams#Public"
|
||||
],
|
||||
"type": "Note"
|
||||
}
|
||||
18
test/fixtures/users_mock/masto_featured.json
vendored
Normal file
18
test/fixtures/users_mock/masto_featured.json
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"@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"
|
||||
}
|
||||
],
|
||||
"id": "https://{{domain}}/users/{{nickname}}/collections/featured",
|
||||
"type": "OrderedCollection",
|
||||
"totalItems": 0,
|
||||
"orderedItems": []
|
||||
}
|
||||
42
test/fixtures/users_mock/user.json
vendored
Normal file
42
test/fixtures/users_mock/user.json
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://example.com/schemas/litepub-0.1.jsonld",
|
||||
{
|
||||
"@language": "und"
|
||||
}
|
||||
],
|
||||
"attachment": [],
|
||||
"endpoints": {
|
||||
"oauthAuthorizationEndpoint": "https://example.com/oauth/authorize",
|
||||
"oauthRegistrationEndpoint": "https://example.com/api/v1/apps",
|
||||
"oauthTokenEndpoint": "https://example.com/oauth/token",
|
||||
"sharedInbox": "https://example.com/inbox"
|
||||
},
|
||||
"followers": "https://example.com/users/{{nickname}}/followers",
|
||||
"following": "https://example.com/users/{{nickname}}/following",
|
||||
"icon": {
|
||||
"type": "Image",
|
||||
"url": "https://example.com/media/4e914f5b84e4a259a3f6c2d2edc9ab642f2ab05f3e3d9c52c81fc2d984b3d51e.jpg"
|
||||
},
|
||||
"id": "https://example.com/users/{{nickname}}",
|
||||
"image": {
|
||||
"type": "Image",
|
||||
"url": "https://example.com/media/f739efddefeee49c6e67e947c4811fdc911785c16ae43da4c3684051fbf8da6a.jpg?name=f739efddefeee49c6e67e947c4811fdc911785c16ae43da4c3684051fbf8da6a.jpg"
|
||||
},
|
||||
"inbox": "https://example.com/users/{{nickname}}/inbox",
|
||||
"manuallyApprovesFollowers": false,
|
||||
"name": "{{nickname}}",
|
||||
"outbox": "https://example.com/users/{{nickname}}/outbox",
|
||||
"preferredUsername": "{{nickname}}",
|
||||
"publicKey": {
|
||||
"id": "https://example.com/users/{{nickname}}#main-key",
|
||||
"owner": "https://example.com/users/{{nickname}}",
|
||||
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5DLtwGXNZElJyxFGfcVc\nXANhaMadj/iYYQwZjOJTV9QsbtiNBeIK54PJrYuU0/0YIdrvS1iqheX5IwXRhcwa\nhm3ZyLz7XeN9st7FBni4BmZMBtMpxAuYuu5p/jbWy13qAiYOhPreCx0wrWgm/lBD\n9mkgaxIxPooBE0S4ZWEJIDIV1Vft3AWcRUyWW1vIBK0uZzs6GYshbQZB952S0yo4\nFzI1hABGHncH8UvuFauh4EZ8tY7/X5I0pGRnDOcRN1dAht5w5yTA+6r5kebiFQjP\nIzN/eCO/a9Flrj9YGW7HDNtjSOH0A31PLRGlJtJO3yK57dnf5ppyCZGfL4emShQo\ncQIDAQAB\n-----END PUBLIC KEY-----\n\n"
|
||||
},
|
||||
"featured": "https://example.com/users/{{nickname}}/collections/featured",
|
||||
"summary": "your friendly neighborhood pleroma developer<br>I like cute things and distributed systems, and really hate delete and redrafts",
|
||||
"tag": [],
|
||||
"type": "Person",
|
||||
"url": "https://example.com/users/{{nickname}}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue