Merge branch 'feature/incoming-remote-unfollow' into 'develop'
Add support for incoming remote unfollows and blocks/unblocks See merge request pleroma/pleroma!158
This commit is contained in:
commit
c2dcd767cf
18 changed files with 475 additions and 62 deletions
29
test/fixtures/mastodon-block-activity.json
vendored
Normal file
29
test/fixtures/mastodon-block-activity.json
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"type": "Block",
|
||||
"signature": {
|
||||
"type": "RsaSignature2017",
|
||||
"signatureValue": "Kn1/UkAQGJVaXBfWLAHcnwHg8YMAUqlEaBuYLazAG+pz5hqivsyrBmPV186Xzr+B4ZLExA9+SnOoNx/GOz4hBm0kAmukNSILAsUd84tcJ2yT9zc1RKtembK4WiwOw7li0+maeDN0HaB6t+6eTqsCWmtiZpprhXD8V1GGT8yG7X24fQ9oFGn+ng7lasbcCC0988Y1eGqNe7KryxcPuQz57YkDapvtONzk8gyLTkZMV4De93MyRHq6GVjQVIgtiYabQAxrX6Q8C+4P/jQoqdWJHEe+MY5JKyNaT/hMPt2Md1ok9fZQBGHlErk22/zy8bSN19GdG09HmIysBUHRYpBLig==",
|
||||
"creator": "http://mastodon.example.org/users/admin#main-key",
|
||||
"created": "2018-02-17T13:29:31Z"
|
||||
},
|
||||
"object": "http://localtesting.pleroma.lol/users/lain",
|
||||
"nickname": "lain",
|
||||
"id": "http://mastodon.example.org/users/admin#follows/2",
|
||||
"actor": "http://mastodon.example.org/users/admin",
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://w3id.org/security/v1",
|
||||
{
|
||||
"toot": "http://joinmastodon.org/ns#",
|
||||
"sensitive": "as:sensitive",
|
||||
"ostatus": "http://ostatus.org#",
|
||||
"movedTo": "as:movedTo",
|
||||
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
||||
"inReplyToAtomUri": "ostatus:inReplyToAtomUri",
|
||||
"conversation": "ostatus:conversation",
|
||||
"atomUri": "ostatus:atomUri",
|
||||
"Hashtag": "as:Hashtag",
|
||||
"Emoji": "toot:Emoji"
|
||||
}
|
||||
]
|
||||
}
|
||||
34
test/fixtures/mastodon-unblock-activity.json
vendored
Normal file
34
test/fixtures/mastodon-unblock-activity.json
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://w3id.org/security/v1",
|
||||
{
|
||||
"toot": "http://joinmastodon.org/ns#",
|
||||
"sensitive": "as:sensitive",
|
||||
"ostatus": "http://ostatus.org#",
|
||||
"movedTo": "as:movedTo",
|
||||
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
||||
"inReplyToAtomUri": "ostatus:inReplyToAtomUri",
|
||||
"conversation": "ostatus:conversation",
|
||||
"atomUri": "ostatus:atomUri",
|
||||
"Hashtag": "as:Hashtag",
|
||||
"Emoji": "toot:Emoji"
|
||||
}
|
||||
],
|
||||
"signature": {
|
||||
"type": "RsaSignature2017",
|
||||
"signatureValue": "Kn1/UkAQGJVaXBfWLAHcnwHg8YMAUqlEaBuYLazAG+pz5hqivsyrBmPV186Xzr+B4ZLExA9+SnOoNx/GOz4hBm0kAmukNSILAsUd84tcJ2yT9zc1RKtembK4WiwOw7li0+maeDN0HaB6t+6eTqsCWmtiZpprhXD8V1GGT8yG7X24fQ9oFGn+ng7lasbcCC0988Y1eGqNe7KryxcPuQz57YkDapvtONzk8gyLTkZMV4De93MyRHq6GVjQVIgtiYabQAxrX6Q8C+4P/jQoqdWJHEe+MY5JKyNaT/hMPt2Md1ok9fZQBGHlErk22/zy8bSN19GdG09HmIysBUHRYpBLig==",
|
||||
"creator": "http://mastodon.example.org/users/admin#main-key",
|
||||
"created": "2018-02-17T13:29:31Z"
|
||||
},
|
||||
"type": "Undo",
|
||||
"object": {
|
||||
"type": "Block",
|
||||
"object": "http://localtesting.pleroma.lol/users/lain",
|
||||
"nickname": "lain",
|
||||
"id": "http://mastodon.example.org/users/admin#blocks/2",
|
||||
"actor": "http://mastodon.example.org/users/admin"
|
||||
},
|
||||
"actor": "http://mastodon.example.org/users/admin",
|
||||
"id": "http://mastodon.example.org/users/admin#blocks/2/undo"
|
||||
}
|
||||
34
test/fixtures/mastodon-unfollow-activity.json
vendored
Normal file
34
test/fixtures/mastodon-unfollow-activity.json
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"@context":[
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://w3id.org/security/v1",
|
||||
{
|
||||
"toot":"http://joinmastodon.org/ns#",
|
||||
"sensitive":"as:sensitive",
|
||||
"ostatus":"http://ostatus.org#",
|
||||
"movedTo":"as:movedTo",
|
||||
"manuallyApprovesFollowers":"as:manuallyApprovesFollowers",
|
||||
"inReplyToAtomUri":"ostatus:inReplyToAtomUri",
|
||||
"conversation":"ostatus:conversation",
|
||||
"atomUri":"ostatus:atomUri",
|
||||
"Hashtag":"as:Hashtag",
|
||||
"Emoji":"toot:Emoji"
|
||||
}
|
||||
],
|
||||
"signature":{
|
||||
"type":"RsaSignature2017",
|
||||
"signatureValue":"Kn1/UkAQGJVaXBfWLAHcnwHg8YMAUqlEaBuYLazAG+pz5hqivsyrBmPV186Xzr+B4ZLExA9+SnOoNx/GOz4hBm0kAmukNSILAsUd84tcJ2yT9zc1RKtembK4WiwOw7li0+maeDN0HaB6t+6eTqsCWmtiZpprhXD8V1GGT8yG7X24fQ9oFGn+ng7lasbcCC0988Y1eGqNe7KryxcPuQz57YkDapvtONzk8gyLTkZMV4De93MyRHq6GVjQVIgtiYabQAxrX6Q8C+4P/jQoqdWJHEe+MY5JKyNaT/hMPt2Md1ok9fZQBGHlErk22/zy8bSN19GdG09HmIysBUHRYpBLig==",
|
||||
"creator":"http://mastodon.example.org/users/admin#main-key",
|
||||
"created":"2018-02-17T13:29:31Z"
|
||||
},
|
||||
"type":"Undo",
|
||||
"object":{
|
||||
"type":"Follow",
|
||||
"object":"http://localtesting.pleroma.lol/users/lain",
|
||||
"nickname":"lain",
|
||||
"id":"http://mastodon.example.org/users/admin#follows/2",
|
||||
"actor":"http://mastodon.example.org/users/admin"
|
||||
},
|
||||
"actor":"http://mastodon.example.org/users/admin",
|
||||
"id": "http://mastodon.example.org/users/admin#follow/2/undo"
|
||||
}
|
||||
68
test/fixtures/unfollow.xml
vendored
Normal file
68
test/fixtures/unfollow.xml
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:media="http://purl.org/syndication/atommedia" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:statusnet="http://status.net/schema/api/1/">
|
||||
<generator uri="https://gnu.io/social" version="1.0.2-dev">GNU social</generator>
|
||||
<id>https://social.heldscal.la/api/statuses/user_timeline/23211.atom</id>
|
||||
<title>lambadalambda timeline</title>
|
||||
<subtitle>Updates from lambadalambda on social.heldscal.la!</subtitle>
|
||||
<logo>https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg</logo>
|
||||
<updated>2017-05-07T09:54:49+00:00</updated>
|
||||
<author>
|
||||
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
|
||||
<uri>https://social.heldscal.la/user/23211</uri>
|
||||
<name>lambadalambda</name>
|
||||
<summary>Call me Deacon Blues.</summary>
|
||||
<link rel="alternate" type="text/html" href="https://social.heldscal.la/lambadalambda"/>
|
||||
<link rel="avatar" type="image/jpeg" media:width="236" media:height="236" href="https://social.heldscal.la/avatar/23211-original-20170416114255.jpeg"/>
|
||||
<link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg"/>
|
||||
<link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="https://social.heldscal.la/avatar/23211-48-20170416114255.jpeg"/>
|
||||
<link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="https://social.heldscal.la/avatar/23211-24-20170416114257.jpeg"/>
|
||||
<poco:preferredUsername>lambadalambda</poco:preferredUsername>
|
||||
<poco:displayName>Constance Variable</poco:displayName>
|
||||
<poco:note>Call me Deacon Blues.</poco:note>
|
||||
<poco:address>
|
||||
<poco:formatted>Berlin</poco:formatted>
|
||||
</poco:address>
|
||||
<poco:urls>
|
||||
<poco:type>homepage</poco:type>
|
||||
<poco:value>https://heldscal.la</poco:value>
|
||||
<poco:primary>true</poco:primary>
|
||||
</poco:urls>
|
||||
<followers url="https://social.heldscal.la/lambadalambda/subscribers"></followers>
|
||||
<statusnet:profile_info local_id="23211"></statusnet:profile_info>
|
||||
</author>
|
||||
<link href="https://social.heldscal.la/lambadalambda" rel="alternate" type="text/html"/>
|
||||
<link href="https://social.heldscal.la/main/sup" rel="http://api.friendfeed.com/2008/03#sup" type="application/json"/>
|
||||
<link href="https://social.heldscal.la/main/push/hub" rel="hub"/>
|
||||
<link href="https://social.heldscal.la/main/salmon/user/23211" rel="salmon"/>
|
||||
<link href="https://social.heldscal.la/main/salmon/user/23211" rel="http://salmon-protocol.org/ns/salmon-replies"/>
|
||||
<link href="https://social.heldscal.la/main/salmon/user/23211" rel="http://salmon-protocol.org/ns/salmon-mention"/>
|
||||
<link href="https://social.heldscal.la/api/statuses/user_timeline/23211.atom" rel="self" type="application/atom+xml"/>
|
||||
<entry>
|
||||
<id>undo:tag:social.heldscal.la,2017-05-07:subscription:23211:person:44803:2017-05-07T09:54:48+00:00</id>
|
||||
<title>Constance Variable (lambadalambda@social.heldscal.la)'s status on Sunday, 07-May-2017 09:54:49 UTC</title>
|
||||
<content type="html"><a href="https://social.heldscal.la/lambadalambda">Constance Variable</a> stopped following <a href="https://pawoo.net/@pekorino">mono</a>.</content>
|
||||
<link rel="alternate" type="text/html" href="https://social.heldscal.la/notice/2092981"/>
|
||||
<activity:verb>http://activitystrea.ms/schema/1.0/unfollow</activity:verb>
|
||||
<published>2017-05-07T09:54:49+00:00</published>
|
||||
<updated>2017-05-07T09:54:49+00:00</updated>
|
||||
<activity:object>
|
||||
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
|
||||
<id>https://pawoo.net/users/pekorino</id>
|
||||
<title>mono</title>
|
||||
<summary>http://shitposter.club/mono 孤独のグルメ</summary>
|
||||
<link rel="alternate" type="text/html" href="https://pawoo.net/@pekorino"/>
|
||||
<link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://social.heldscal.la/theme/neo-gnu/default-avatar-profile.png"/>
|
||||
<link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://social.heldscal.la/theme/neo-gnu/default-avatar-stream.png"/>
|
||||
<link rel="avatar" type="image/png" media:width="24" media:height="24" href="http://social.heldscal.la/theme/neo-gnu/default-avatar-mini.png"/>
|
||||
<poco:preferredUsername>pekorino</poco:preferredUsername>
|
||||
<poco:displayName>mono</poco:displayName>
|
||||
<poco:note>http://shitposter.club/mono 孤独のグルメ</poco:note>
|
||||
</activity:object>
|
||||
<link rel="ostatus:conversation" href="https://social.heldscal.la/conversation/1079786"/>
|
||||
<ostatus:conversation href="https://social.heldscal.la/conversation/1079786" local_id="1079786" ref="tag:social.heldscal.la,2017-05-07:objectType=thread:nonce=6e80caf94e03029f">tag:social.heldscal.la,2017-05-07:objectType=thread:nonce=6e80caf94e03029f</ostatus:conversation>
|
||||
<link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/collection" href="http://activityschema.org/collection/public"/>
|
||||
<link rel="self" type="application/atom+xml" href="https://social.heldscal.la/api/statuses/show/2092981.atom"/>
|
||||
<link rel="edit" type="application/atom+xml" href="https://social.heldscal.la/api/statuses/show/2092981.atom"/>
|
||||
<statusnet:notice_info local_id="2092981" source="activity"></statusnet:notice_info>
|
||||
</entry>
|
||||
</feed>
|
||||
Loading…
Add table
Add a link
Reference in a new issue