mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-12 21:15:53 +00:00
some fixes for update_apub_test_files.sh
This commit is contained in:
parent
c514f56158
commit
837c058843
5 changed files with 92 additions and 92 deletions
|
@ -2,35 +2,35 @@
|
|||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"matrixUserId": {
|
||||
"type": "sc:Text",
|
||||
"id": "as:alsoKnownAs"
|
||||
},
|
||||
"sensitive": "as:sensitive",
|
||||
"stickied": "as:stickied",
|
||||
"moderators": "as:moderators",
|
||||
"sc": "http://schema.org#",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"comments_enabled": {
|
||||
"type": "sc:Boolean",
|
||||
"id": "pt:commentsEnabled"
|
||||
}
|
||||
"id": "pt:commentsEnabled",
|
||||
"type": "sc:Boolean"
|
||||
},
|
||||
"matrixUserId": {
|
||||
"id": "as:alsoKnownAs",
|
||||
"type": "sc:Text"
|
||||
},
|
||||
"moderators": "as:moderators",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"sc": "http://schema.org#",
|
||||
"sensitive": "as:sensitive",
|
||||
"stickied": "as:stickied"
|
||||
},
|
||||
"https://w3id.org/security/v1"
|
||||
],
|
||||
"type": "Note",
|
||||
"id": "https://lemmy.ml/comment/38741",
|
||||
"attributedTo": "https://lemmy.ml/u/nutomic",
|
||||
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
||||
"content": "While I very much get and respect the general sentiment, I think from the perspective of a Central European non-English person in a country with a significant number of, also non-English speaking Nazis, the current approach of filtering slurs based on an English regex is fatally flawed. You can happily use Lemmy to create a hostile far right community where everyone is easily able to use whatever hurtful slurs they want as long as they are not the few specifically blocked English ones. \n\nOn the other hand you create a situation where people feel the need to question the choice of software of their community because they read about censorship or whatever to be used in Lemmy and might stay away and move to other software even though the would maybe never be affected by the slur-filter as the number is not so large and the overlap with other languages not very big.\n\nSo I would argue that this specific implementation of a slur-filter just doesn't achieve what it aims to achieve and should be fundamentally rethought, maybe as configurable per instance.",
|
||||
"id": "https://lemmy.ml/comment/38741",
|
||||
"inReplyTo": [
|
||||
"https://lemmy.ml/post/55143"
|
||||
],
|
||||
"mediaType": "text/html",
|
||||
"published": "2021-03-01T13:42:43.966208+00:00",
|
||||
"source": {
|
||||
"content": "While I very much get and respect the general sentiment, I think from the perspective of a Central European non-English person in a country with a significant number of, also non-English speaking Nazis, the current approach of filtering slurs based on an English regex is fatally flawed. You can happily use Lemmy to create a hostile far right community where everyone is easily able to use whatever hurtful slurs they want as long as they are not the few specifically blocked English ones. \n\nOn the other hand you create a situation where people feel the need to question the choice of software of their community because they read about censorship or whatever to be used in Lemmy and might stay away and move to other software even though the would maybe never be affected by the slur-filter as the number is not so large and the overlap with other languages not very big.\n\nSo I would argue that this specific implementation of a slur-filter just doesn't achieve what it aims to achieve and should be fundamentally rethought, maybe as configurable per instance.",
|
||||
"mediaType": "text/markdown"
|
||||
},
|
||||
"inReplyTo": [
|
||||
"https://lemmy.ml/post/55143"
|
||||
],
|
||||
"published": "2021-03-01T13:42:43.966208+00:00",
|
||||
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
||||
"type": "Note",
|
||||
"updated": "2021-03-01T13:43:03.955787+00:00"
|
||||
}
|
||||
|
|
|
@ -2,49 +2,49 @@
|
|||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"moderators": "as:moderators",
|
||||
"sc": "http://schema.org#",
|
||||
"matrixUserId": {
|
||||
"type": "sc:Text",
|
||||
"id": "as:alsoKnownAs"
|
||||
},
|
||||
"stickied": "as:stickied",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"comments_enabled": {
|
||||
"type": "sc:Boolean",
|
||||
"id": "pt:commentsEnabled"
|
||||
"id": "pt:commentsEnabled",
|
||||
"type": "sc:Boolean"
|
||||
},
|
||||
"sensitive": "as:sensitive"
|
||||
"matrixUserId": {
|
||||
"id": "as:alsoKnownAs",
|
||||
"type": "sc:Text"
|
||||
},
|
||||
"moderators": "as:moderators",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"sc": "http://schema.org#",
|
||||
"sensitive": "as:sensitive",
|
||||
"stickied": "as:stickied"
|
||||
},
|
||||
"https://w3id.org/security/v1"
|
||||
],
|
||||
"type": "Group",
|
||||
"id": "https://lemmy.ml/c/announcements",
|
||||
"preferredUsername": "announcements",
|
||||
"name": "Announcements",
|
||||
"content": "<p>Lemmy Announcements</p>\n<hr />\n<p>Feel free to announce new communities here.</p>\n<p>Other than that, this is <em>reserved for admin use only</em>.</p>\n",
|
||||
"mediaType": "text/html",
|
||||
"source": {
|
||||
"content": "Lemmy Announcements\n\n---\n\nFeel free to announce new communities here.\n\nOther than that, this is *reserved for admin use only*.",
|
||||
"mediaType": "text/markdown"
|
||||
"endpoints": {
|
||||
"sharedInbox": "https://lemmy.ml/inbox"
|
||||
},
|
||||
"followers": "https://lemmy.ml/c/announcements/followers",
|
||||
"icon": {
|
||||
"type": "Image",
|
||||
"url": "https://lemmy.ml/pictrs/image/waqyZwLAy4.webp"
|
||||
},
|
||||
"sensitive": false,
|
||||
"moderators": "https://lemmy.ml/c/announcements/not_moderators",
|
||||
"id": "https://lemmy.ml/c/announcements",
|
||||
"inbox": "https://lemmy.ml/c/announcements/inbox",
|
||||
"mediaType": "text/html",
|
||||
"moderators": "https://lemmy.ml/c/announcements/not_moderators",
|
||||
"name": "Announcements",
|
||||
"outbox": "https://lemmy.ml/c/announcements/not_outbox",
|
||||
"followers": "https://lemmy.ml/c/announcements/followers",
|
||||
"endpoints": {
|
||||
"sharedInbox": "https://lemmy.ml/inbox"
|
||||
},
|
||||
"preferredUsername": "announcements",
|
||||
"publicKey": {
|
||||
"id": "https://lemmy.ml/c/announcements#main-key",
|
||||
"owner": "https://lemmy.ml/c/announcements",
|
||||
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzRjKTNtvDCmugplwEh+g\nx1bhKm6BHUZfXfpscgMMm7tXFswSDzUQirMgfkxa9ubfr1PDFKffA2vQ9x6CyuO/\n70xTafdOHyV1tSqzgKz0ZvFZ/VCOo6qy1mYWVkrtBm/fKzM+87MdkKYB/zI4VyEJ\nLfLQgjwxBAEYUH3CBG71U0gO0TwbimWNN0vqlfp0QfThNe1WYObF88ZVzMLgFbr7\nRHBItZjlZ/d8foPDidlIR3l2dJjy0EsD8F9JM340jtX7LXqFmU4j1AQKNHTDLnUF\nwYVhzuQGNJ504l5LZkFG54XfIFT7dx2QwuuM9bSnfPv/98RYrq1Si6tCkxEt1cVe\n4wIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
},
|
||||
"published": "2019-06-02T16:43:50.799554+00:00",
|
||||
"sensitive": false,
|
||||
"source": {
|
||||
"content": "Lemmy Announcements\n\n---\n\nFeel free to announce new communities here.\n\nOther than that, this is *reserved for admin use only*.",
|
||||
"mediaType": "text/markdown"
|
||||
},
|
||||
"type": "Group",
|
||||
"updated": "2021-03-10T17:18:10.498868+00:00"
|
||||
}
|
||||
|
|
|
@ -2,45 +2,45 @@
|
|||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"matrixUserId": {
|
||||
"type": "sc:Text",
|
||||
"id": "as:alsoKnownAs"
|
||||
"comments_enabled": {
|
||||
"id": "pt:commentsEnabled",
|
||||
"type": "sc:Boolean"
|
||||
},
|
||||
"matrixUserId": {
|
||||
"id": "as:alsoKnownAs",
|
||||
"type": "sc:Text"
|
||||
},
|
||||
"moderators": "as:moderators",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"sc": "http://schema.org#",
|
||||
"sensitive": "as:sensitive",
|
||||
"stickied": "as:stickied",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"comments_enabled": {
|
||||
"type": "sc:Boolean",
|
||||
"id": "pt:commentsEnabled"
|
||||
},
|
||||
"moderators": "as:moderators"
|
||||
"stickied": "as:stickied"
|
||||
},
|
||||
"https://w3id.org/security/v1"
|
||||
],
|
||||
"type": "Person",
|
||||
"id": "https://lemmy.ml/u/nutomic",
|
||||
"preferredUsername": "nutomic",
|
||||
"content": "<p>Lemmy maintainer. Interested in politics, video games, and many other things.</p>\n",
|
||||
"mediaType": "text/html",
|
||||
"source": {
|
||||
"content": "Lemmy maintainer. Interested in politics, video games, and many other things.",
|
||||
"mediaType": "text/markdown"
|
||||
"endpoints": {
|
||||
"sharedInbox": "https://lemmy.ml/inbox"
|
||||
},
|
||||
"icon": {
|
||||
"type": "Image",
|
||||
"url": "https://lemmy.ml/pictrs/image/ed9ej7.jpg"
|
||||
},
|
||||
"id": "https://lemmy.ml/u/nutomic",
|
||||
"inbox": "https://lemmy.ml/u/nutomic/inbox",
|
||||
"mediaType": "text/html",
|
||||
"outbox": "https://lemmy.ml/u/nutomic/outbox",
|
||||
"endpoints": {
|
||||
"sharedInbox": "https://lemmy.ml/inbox"
|
||||
},
|
||||
"preferredUsername": "nutomic",
|
||||
"publicKey": {
|
||||
"id": "https://lemmy.ml/u/nutomic#main-key",
|
||||
"owner": "https://lemmy.ml/u/nutomic",
|
||||
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0lP99/s5Vv+XbPdkeqIJ\nwoD4GFnHmBnBHdEKChEUWfWj1TtioC/rGNoXFQeXQA3Amhy4nxSceiDnUgwkkuQY\nv0MtIW58NzgknEavtllxL+LSds5pg3gANaDIk8UiWTkqXTg0GnlJMpCK1Chen0l/\nszL6DEvUyTSuS5ZYDXFgewF89Pe7U0S15V5U2Harv7AgJYDyxmUL0D1pGuUCRqcE\nl5MTHJjrXeNnH1w2g8aly8YlO/Cr0L51rFg/lBF23vni7ZLv8HbmWh6YpaAf1R8h\nE45zKR7OHqymdjzrg1ITBwovefpwMkVgnJ+Wdr4HPnFlBSkXPoZeM11+Z8L0anzA\nXwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
},
|
||||
"published": "2020-01-17T01:38:22.348392+00:00",
|
||||
"source": {
|
||||
"content": "Lemmy maintainer. Interested in politics, video games, and many other things.",
|
||||
"mediaType": "text/markdown"
|
||||
},
|
||||
"type": "Person",
|
||||
"updated": "2021-08-13T00:11:15.941990+00:00"
|
||||
}
|
||||
|
|
|
@ -2,38 +2,38 @@
|
|||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"moderators": "as:moderators",
|
||||
"matrixUserId": {
|
||||
"type": "sc:Text",
|
||||
"id": "as:alsoKnownAs"
|
||||
},
|
||||
"sensitive": "as:sensitive",
|
||||
"sc": "http://schema.org#",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"comments_enabled": {
|
||||
"type": "sc:Boolean",
|
||||
"id": "pt:commentsEnabled"
|
||||
"id": "pt:commentsEnabled",
|
||||
"type": "sc:Boolean"
|
||||
},
|
||||
"matrixUserId": {
|
||||
"id": "as:alsoKnownAs",
|
||||
"type": "sc:Text"
|
||||
},
|
||||
"moderators": "as:moderators",
|
||||
"pt": "https://join-lemmy.org#",
|
||||
"sc": "http://schema.org#",
|
||||
"sensitive": "as:sensitive",
|
||||
"stickied": "as:stickied"
|
||||
},
|
||||
"https://w3id.org/security/v1"
|
||||
],
|
||||
"type": "Page",
|
||||
"id": "https://lemmy.ml/post/55143",
|
||||
"attributedTo": "https://lemmy.ml/u/nutomic",
|
||||
"to": [
|
||||
"https://lemmy.ml/c/announcements",
|
||||
"https://www.w3.org/ns/activitystreams#Public"
|
||||
],
|
||||
"name": "Statement on Politics of Lemmy.ml",
|
||||
"commentsEnabled": true,
|
||||
"content": "<p>Recently there have been some discussions about the political stances of the Lemmy developers and site admins. To clear up some misconceptions: Lemmy is run by a team of people with different ideologies, including anti-capitalist, communist, anarchist, and others. While @dessalines and I are communists, we take decisions collectively, and don't demand that anyone adopt our views or convert to our ideologies. We wouldn't devote so much time to building a federated site otherwise.</p>\n<p>What's important to us is that you follow the site rules and <a href=\"https://join.lemmy.ml/docs/en/code_of_conduct.html\">Code of Conduct</a>. Meaning primarily, no-bigotry, and being respectful towards others. As long as that is the case, we can get along perfectly fine.</p>\n<p>In general we are open for constructive feedback, so please contact any member of the admin team if you have an idea how to improve Lemmy.</p>\n<h2>Slur Filter</h2>\n<p>We also noticed a consistent criticism of the built-in slur filter in Lemmy. Not so much on lemmy.ml itself, but whenever Lemmy is recommended elsewhere, a few usual suspects keep bringing it up. To these people we say the following: we are using the slur filter as a tool to keep a friendly atmosphere, and prevent racists, sexists and other bigots from using Lemmy. Its existence alone has lead many of them to not make an account, or run an instance: a clear net positive.</p>\n<p>You can see for yourself the words which are blocked (content warning, <a href=\"https://github.com/LemmyNet/lemmy/blob/main/crates/utils/src/utils.rs#L10\">link here</a>). Note that it doesn't include any simple swear words, but only slurs which are used to insult and attack other people. If you want to use any of these words, then please stay on one of the many platforms that permit them. Lemmy is not for you, and we don't want you here.</p>\n<p>We are fully aware that the slur filter is not perfect. It is made for American English, and can give false positives in other languages or dialects. We are totally willing to fix such problems on a case by case basis, simply open an issue in our <a href=\"https://github.com/LemmyNet/lemmy/issues\">repo </a>with a description of the problem.</p>\n",
|
||||
"id": "https://lemmy.ml/post/55143",
|
||||
"mediaType": "text/html",
|
||||
"name": "Statement on Politics of Lemmy.ml",
|
||||
"published": "2021-02-26T12:35:34.292626+00:00",
|
||||
"sensitive": false,
|
||||
"source": {
|
||||
"content": "Recently there have been some discussions about the political stances of the Lemmy developers and site admins. To clear up some misconceptions: Lemmy is run by a team of people with different ideologies, including anti-capitalist, communist, anarchist, and others. While @dessalines and I are communists, we take decisions collectively, and don't demand that anyone adopt our views or convert to our ideologies. We wouldn't devote so much time to building a federated site otherwise.\n\nWhat's important to us is that you follow the site rules and [Code of Conduct](https://join.lemmy.ml/docs/en/code_of_conduct.html). Meaning primarily, no-bigotry, and being respectful towards others. As long as that is the case, we can get along perfectly fine.\n\nIn general we are open for constructive feedback, so please contact any member of the admin team if you have an idea how to improve Lemmy. \n\n## Slur Filter\n\nWe also noticed a consistent criticism of the built-in slur filter in Lemmy. Not so much on lemmy.ml itself, but whenever Lemmy is recommended elsewhere, a few usual suspects keep bringing it up. To these people we say the following: we are using the slur filter as a tool to keep a friendly atmosphere, and prevent racists, sexists and other bigots from using Lemmy. Its existence alone has lead many of them to not make an account, or run an instance: a clear net positive.\n\nYou can see for yourself the words which are blocked (content warning, [link here](https://github.com/LemmyNet/lemmy/blob/main/crates/utils/src/utils.rs#L10)). Note that it doesn't include any simple swear words, but only slurs which are used to insult and attack other people. If you want to use any of these words, then please stay on one of the many platforms that permit them. Lemmy is not for you, and we don't want you here.\n\nWe are fully aware that the slur filter is not perfect. It is made for American English, and can give false positives in other languages or dialects. We are totally willing to fix such problems on a case by case basis, simply open an issue in our [repo ](https://github.com/LemmyNet/lemmy/issues)with a description of the problem.",
|
||||
"mediaType": "text/markdown"
|
||||
},
|
||||
"commentsEnabled": true,
|
||||
"sensitive": false,
|
||||
"stickied": true,
|
||||
"published": "2021-02-26T12:35:34.292626+00:00"
|
||||
"to": [
|
||||
"https://lemmy.ml/c/announcements",
|
||||
"https://www.w3.org/ns/activitystreams#Public"
|
||||
],
|
||||
"type": "Page"
|
||||
}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/u/nutomic | jq \
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/u/nutomic | jq -S \
|
||||
> crates/apub/assets/lemmy-person.json
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/c/announcements | jq \
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/c/announcements | jq -S \
|
||||
> crates/apub/assets/lemmy-community.json
|
||||
# replace these collection links so that tests dont make any actual http requests
|
||||
sed -i 's/https:\/\/lemmy.ml\/c\/announcements\/outbox/https:\\/\\/lemmy.ml\\/c\\/announcements\\/not_outbox/g' crates/apub/assets/lemmy-community.json
|
||||
sed -i 's/https:\/\/lemmy.ml\/c\/announcements\/moderators/https:\\/\\/lemmy.ml\\/c\\/announcements\\/not_moderators/g' crates/apub/assets/lemmy-community.json
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/post/55143 | jq \
|
||||
sed -i 's/https:\/\/lemmy.ml\/c\/announcements\/outbox/https:\/\/lemmy.ml\/c\/announcements\/not_outbox/g' crates/apub/assets/lemmy-community.json
|
||||
sed -i 's/https:\/\/lemmy.ml\/c\/announcements\/moderators/https:\/\/lemmy.ml\/c\/announcements\/not_moderators/g' crates/apub/assets/lemmy-community.json
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/post/55143 | jq -S \
|
||||
> crates/apub/assets/lemmy-post.json
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/comment/38741 | jq \
|
||||
curl -H "Accept: application/activity+json" https://lemmy.ml/comment/38741 | jq -S \
|
||||
> crates/apub/assets/lemmy-comment.json
|
||||
# replace attributed_to user, so that it takes the same one from above
|
||||
sed -i 's/https:\/\/lemmy.ml\/u\/my_test/https:\/\/lemmy.ml\/u\/nutomic/g' crates/apub/assets/lemmy-comment.json
|
||||
|
||||
curl -H "Accept: application/activity+json" https://queer.hacktivis.me/users/lanodan | jq \
|
||||
curl -H "Accept: application/activity+json" https://queer.hacktivis.me/users/lanodan | jq -S \
|
||||
> crates/apub/assets/pleroma-person.json
|
||||
curl -H "Accept: application/activity+json" https://queer.hacktivis.me/objects/8d4973f4-53de-49cd-8c27-df160e16a9c2 | jq \
|
||||
curl -H "Accept: application/activity+json" https://queer.hacktivis.me/objects/8d4973f4-53de-49cd-8c27-df160e16a9c2 | jq -S \
|
||||
> crates/apub/assets/pleroma-comment.json
|
||||
# rewrite comment inReplyTo so that it refers to our post above (cause lemmy doesnt support standalone comments)
|
||||
sed -i 's/https:\/\/pleroma.popolon.org\/objects\/bf84a0fb-2ec2-4dff-a1d9-6b573f94fb16/https:\/\/lemmy.ml\/post\/55143/g' crates/apub/assets/pleroma-comment.json
|
||||
|
|
Loading…
Reference in a new issue