stable
commit
ed4f9f6a29
@ -0,0 +1,42 @@
|
||||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.BlockValidator do
|
||||
use Ecto.Schema
|
||||
|
||||
alias Pleroma.EctoType.ActivityPub.ObjectValidators
|
||||
|
||||
import Ecto.Changeset
|
||||
import Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations
|
||||
|
||||
@primary_key false
|
||||
|
||||
embedded_schema do
|
||||
field(:id, ObjectValidators.ObjectID, primary_key: true)
|
||||
field(:type, :string)
|
||||
field(:actor, ObjectValidators.ObjectID)
|
||||
field(:to, ObjectValidators.Recipients, default: [])
|
||||
field(:cc, ObjectValidators.Recipients, default: [])
|
||||
field(:object, ObjectValidators.ObjectID)
|
||||
end
|
||||
|
||||
def cast_data(data) do
|
||||
%__MODULE__{}
|
||||
|> cast(data, __schema__(:fields))
|
||||
end
|
||||
|
||||
def validate_data(cng) do
|
||||
cng
|
||||
|> validate_required([:id, :type, :actor, :to, :cc, :object])
|
||||
|> validate_inclusion(:type, ["Block"])
|
||||
|> validate_actor_presence()
|
||||
|> validate_actor_presence(field_name: :object)
|
||||
end
|
||||
|
||||
def cast_and_validate(data) do
|
||||
data
|
||||
|> cast_data
|
||||
|> validate_data
|
||||
end
|
||||
end
|
@ -0,0 +1,11 @@
|
||||
defmodule Pleroma.Repo.Migrations.RenameUserSettingsCol do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
rename(table(:users), :settings, to: :mastofe_settings)
|
||||
end
|
||||
|
||||
def down do
|
||||
rename(table(:users), :mastofe_settings, to: :settings)
|
||||
end
|
||||
end
|
@ -0,0 +1,10 @@
|
||||
defmodule Pleroma.Repo.Migrations.RemoveTeslaFromConfig do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute("DELETE FROM config WHERE config.group = ':tesla'")
|
||||
end
|
||||
|
||||
def down do
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=renderer content=webkit><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>Admin FE</title><link rel="shortcut icon" href=favicon.ico><link href=chunk-elementUI.1abbc9b8.css rel=stylesheet><link href=chunk-libs.686b5876.css rel=stylesheet><link href=app.6684eb28.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/runtime.5bae86dc.js></script><script type=text/javascript src=static/js/chunk-elementUI.fba0efec.js></script><script type=text/javascript src=static/js/chunk-libs.b8c453ab.js></script><script type=text/javascript src=static/js/app.3fcec8f6.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=renderer content=webkit><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>Admin FE</title><link rel="shortcut icon" href=favicon.ico><link href=chunk-elementUI.1abbc9b8.css rel=stylesheet><link href=chunk-libs.686b5876.css rel=stylesheet><link href=app.01bdb34a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/runtime.0a70a9f5.js></script><script type=text/javascript src=static/js/chunk-elementUI.fba0efec.js></script><script type=text/javascript src=static/js/chunk-libs.b8c453ab.js></script><script type=text/javascript src=static/js/app.f220ac13.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
!function(e){function n(n){for(var t,r,a=n[0],f=n[1],h=n[2],i=0,l=[];i<a.length;i++)r=a[i],u[r]&&l.push(u[r][0]),u[r]=0;for(t in f)Object.prototype.hasOwnProperty.call(f,t)&&(e[t]=f[t]);for(d&&d(n);l.length;)l.shift()();return o.push.apply(o,h||[]),c()}function c(){for(var e,n=0;n<o.length;n++){for(var c=o[n],t=!0,r=1;r<c.length;r++){var f=c[r];0!==u[f]&&(t=!1)}t&&(o.splice(n--,1),e=a(a.s=c[0]))}return e}var t={},r={runtime:0},u={runtime:0},o=[];function a(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,a),c.l=!0,c.exports}a.e=function(e){var n=[];r[e]?n.push(r[e]):0!==r[e]&&{"chunk-070d":1,"chunk-6e81":1,"chunk-commons":1,"chunk-143c":1,"chunk-0cbc":1,"chunk-43ca":1,"chunk-7c6b":1,"chunk-c5f4":1,"chunk-176e":1,"chunk-e404":1,"chunk-1609":1,"chunk-5882":1,"chunk-7506":1,"chunk-4e7e":1}[e]&&n.push(r[e]=new Promise(function(n,c){for(var t=({"chunk-commons":"chunk-commons"}[e]||e)+"."+{"7zzA":"31d6cfe0",JEtC:"31d6cfe0","chunk-070d":"d2dd6533","chunk-6e81":"ca3b222f","chunk-commons":"7f6d2d11",ZhIB:"31d6cfe0","chunk-143c":"43ada4fc","chunk-0cbc":"60bba79b","chunk-5118":"31d6cfe0","chunk-43ca":"0de86b6d","chunk-7c6b":"d9e7180a","chunk-c5f4":"0827b1ce","chunk-df62":"31d6cfe0","chunk-176e":"5d7d957b","chunk-e404":"a56021ae","chunk-1609":"408dae86","chunk-5882":"f65db7f2","chunk-7506":"f01f6c2a",oAJy:"31d6cfe0","chunk-16d0":"31d6cfe0","chunk-4e7e":"5afe1978"}[e]+".css",r=a.p+t,u=document.getElementsByTagName("link"),o=0;o<u.length;o++){var f=(i=u[o]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(f===t||f===r))return n()}var h=document.getElementsByTagName("style");for(o=0;o<h.length;o++){var i;if((f=(i=h[o]).getAttribute("data-href"))===t||f===r)return n()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=n,d.onerror=function(n){var t=n&&n.target&&n.target.src||r,u=new Error("Loading CSS chunk "+e+" failed.\n("+t+")");u.request=t,c(u)},d.href=r,document.getElementsByTagName("head")[0].appendChild(d)}).then(function(){r[e]=0}));var c=u[e];if(0!==c)if(c)n.push(c[2]);else{var t=new Promise(function(n,t){c=u[e]=[n,t]});n.push(c[2]=t);var o,f=document.createElement("script");f.charset="utf-8",f.timeout=120,a.nc&&f.setAttribute("nonce",a.nc),f.src=function(e){return a.p+"static/js/"+({"chunk-commons":"chunk-commons"}[e]||e)+"."+{"7zzA":"e1ae1c94",JEtC:"f9ba4594","chunk-070d":"7e10a520","chunk-6e81":"6efb01f4","chunk-commons":"5a106955",ZhIB:"861df339","chunk-143c":"fc1825bf","chunk-0cbc":"43ff796f","chunk-5118":"7c48ad58","chunk-43ca":"3debeff7","chunk-7c6b":"e63ae1da","chunk-c5f4":"304479e7","chunk-df62":"6c5105a6","chunk-176e":"c4995511","chunk-e404":"554bc2e3","chunk-1609":"98da6b01","chunk-5882":"7cbc4c1b","chunk-7506":"a3364e53",oAJy:"840fb1c2","chunk-16d0":"6ce78978","chunk-4e7e":"91b5e73a"}[e]+".js"}(e),o=function(n){f.onerror=f.onload=null,clearTimeout(h);var c=u[e];if(0!==c){if(c){var t=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src,o=new Error("Loading chunk "+e+" failed.\n("+t+": "+r+")");o.type=t,o.request=r,c[1](o)}u[e]=void 0}};var h=setTimeout(function(){o({type:"timeout",target:f})},12e4);f.onerror=f.onload=o,document.head.appendChild(f)}return Promise.all(n)},a.m=e,a.c=t,a.d=function(e,n,c){a.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:c})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,n){if(1&n&&(e=a(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)a.d(c,t,function(n){return e[n]}.bind(null,t));return c},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="",a.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],h=f.push.bind(f);f.push=n,f=f.slice();for(var i=0;i<f.length;i++)n(f[i]);var d=h;c()}([]);
|
||||
//# sourceMappingURL=runtime.5bae86dc.js.map
|
||||
!function(e){function n(n){for(var t,r,a=n[0],f=n[1],h=n[2],i=0,l=[];i<a.length;i++)r=a[i],u[r]&&l.push(u[r][0]),u[r]=0;for(t in f)Object.prototype.hasOwnProperty.call(f,t)&&(e[t]=f[t]);for(d&&d(n);l.length;)l.shift()();return o.push.apply(o,h||[]),c()}function c(){for(var e,n=0;n<o.length;n++){for(var c=o[n],t=!0,r=1;r<c.length;r++){var f=c[r];0!==u[f]&&(t=!1)}t&&(o.splice(n--,1),e=a(a.s=c[0]))}return e}var t={},r={runtime:0},u={runtime:0},o=[];function a(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,a),c.l=!0,c.exports}a.e=function(e){var n=[];r[e]?n.push(r[e]):0!==r[e]&&{"chunk-070d":1,"chunk-6e81":1,"chunk-commons":1,"chunk-143c":1,"chunk-0cbc":1,"chunk-43ca":1,"chunk-7c6b":1,"chunk-c5f4":1,"chunk-176e":1,"chunk-e404":1,"chunk-1609":1,"chunk-5882":1,"chunk-7506":1,"chunk-4e7e":1}[e]&&n.push(r[e]=new Promise(function(n,c){for(var t=({"chunk-commons":"chunk-commons"}[e]||e)+"."+{"7zzA":"31d6cfe0",JEtC:"31d6cfe0","chunk-070d":"d2dd6533","chunk-6e81":"ca3b222f","chunk-commons":"7f6d2d11",ZhIB:"31d6cfe0","chunk-143c":"43ada4fc","chunk-0cbc":"60bba79b","chunk-5118":"31d6cfe0","chunk-43ca":"af749c6c","chunk-7c6b":"d9e7180a","chunk-c5f4":"b1112f18","chunk-df62":"31d6cfe0","chunk-176e":"5d7d957b","chunk-e404":"a56021ae","chunk-1609":"408dae86","chunk-5882":"f65db7f2","chunk-7506":"f01f6c2a",oAJy:"31d6cfe0","chunk-16d0":"31d6cfe0","chunk-4e7e":"5afe1978"}[e]+".css",r=a.p+t,u=document.getElementsByTagName("link"),o=0;o<u.length;o++){var f=(i=u[o]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(f===t||f===r))return n()}var h=document.getElementsByTagName("style");for(o=0;o<h.length;o++){var i;if((f=(i=h[o]).getAttribute("data-href"))===t||f===r)return n()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=n,d.onerror=function(n){var t=n&&n.target&&n.target.src||r,u=new Error("Loading CSS chunk "+e+" failed.\n("+t+")");u.request=t,c(u)},d.href=r,document.getElementsByTagName("head")[0].appendChild(d)}).then(function(){r[e]=0}));var c=u[e];if(0!==c)if(c)n.push(c[2]);else{var t=new Promise(function(n,t){c=u[e]=[n,t]});n.push(c[2]=t);var o,f=document.createElement("script");f.charset="utf-8",f.timeout=120,a.nc&&f.setAttribute("nonce",a.nc),f.src=function(e){return a.p+"static/js/"+({"chunk-commons":"chunk-commons"}[e]||e)+"."+{"7zzA":"e1ae1c94",JEtC:"f9ba4594","chunk-070d":"7e10a520","chunk-6e81":"6efb01f4","chunk-commons":"5a106955",ZhIB:"861df339","chunk-143c":"fc1825bf","chunk-0cbc":"2b0f8802","chunk-5118":"7c48ad58","chunk-43ca":"aceb457c","chunk-7c6b":"e63ae1da","chunk-c5f4":"cf269f9b","chunk-df62":"6c5105a6","chunk-176e":"c4995511","chunk-e404":"554bc2e3","chunk-1609":"98da6b01","chunk-5882":"7cbc4c1b","chunk-7506":"a3364e53",oAJy:"840fb1c2","chunk-16d0":"6ce78978","chunk-4e7e":"91b5e73a"}[e]+".js"}(e),o=function(n){f.onerror=f.onload=null,clearTimeout(h);var c=u[e];if(0!==c){if(c){var t=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src,o=new Error("Loading chunk "+e+" failed.\n("+t+": "+r+")");o.type=t,o.request=r,c[1](o)}u[e]=void 0}};var h=setTimeout(function(){o({type:"timeout",target:f})},12e4);f.onerror=f.onload=o,document.head.appendChild(f)}return Promise.all(n)},a.m=e,a.c=t,a.d=function(e,n,c){a.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:c})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,n){if(1&n&&(e=a(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)a.d(c,t,function(n){return e[n]}.bind(null,t));return c},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="",a.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],h=f.push.bind(f);f.push=n,f=f.slice();for(var i=0;i<f.length;i++)n(f[i]);var d=h;c()}([]);
|
||||
//# sourceMappingURL=runtime.0a70a9f5.js.map
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,72 @@
|
||||
{
|
||||
"@context" : [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"atomUri" : "ostatus:atomUri",
|
||||
"conversation" : "ostatus:conversation",
|
||||
"inReplyToAtomUri" : "ostatus:inReplyToAtomUri",
|
||||
"ostatus" : "http://ostatus.org#",
|
||||
"sensitive" : "as:sensitive",
|
||||
"toot" : "http://joinmastodon.org/ns#",
|
||||
"votersCount" : "toot:votersCount"
|
||||
}
|
||||
],
|
||||
"atomUri" : "https://busshi.moe/users/tuxcrafting/statuses/104410921027210069",
|
||||
"attachment" : [],
|
||||
"attributedTo" : "https://busshi.moe/users/tuxcrafting",
|
||||
"cc" : [
|
||||
"https://busshi.moe/users/tuxcrafting/followers",
|
||||
"https://stereophonic.space/users/fixpoint",
|
||||
"https://blob.cat/users/blobyoumu",
|
||||
"https://cawfee.club/users/grips",
|
||||
"https://jaeger.website/users/igel"
|
||||
],
|
||||
"content" : "<p><span class=\"h-card\"><a href=\"https://stereophonic.space/users/fixpoint\" class=\"u-url mention\">@<span>fixpoint</span></a></span> <span class=\"h-card\"><a href=\"https://blob.cat/users/blobyoumu\" class=\"u-url mention\">@<span>blobyoumu</span></a></span> <span class=\"h-card\"><a href=\"https://cawfee.club/users/grips\" class=\"u-url mention\">@<span>grips</span></a></span> <span class=\"h-card\"><a href=\"https://jaeger.website/users/igel\" class=\"u-url mention\">@<span>igel</span></a></span> there's a difference between not liking nukes and not liking nuclear power<br />nukes are pretty bad as are all WMDs in general but disliking nuclear power just indicates you are unable of thought</p>",
|
||||
"contentMap" : {
|
||||
"en" : "<p><span class=\"h-card\"><a href=\"https://stereophonic.space/users/fixpoint\" class=\"u-url mention\">@<span>fixpoint</span></a></span> <span class=\"h-card\"><a href=\"https://blob.cat/users/blobyoumu\" class=\"u-url mention\">@<span>blobyoumu</span></a></span> <span class=\"h-card\"><a href=\"https://cawfee.club/users/grips\" class=\"u-url mention\">@<span>grips</span></a></span> <span class=\"h-card\"><a href=\"https://jaeger.website/users/igel\" class=\"u-url mention\">@<span>igel</span></a></span> there's a difference between not liking nukes and not liking nuclear power<br />nukes are pretty bad as are all WMDs in general but disliking nuclear power just indicates you are unable of thought</p>"
|
||||
},
|
||||
"conversation" : "https://cawfee.club/contexts/ad6c73d8-efc2-4e74-84ea-2dacf1a27a5e",
|
||||
"id" : "https://busshi.moe/users/tuxcrafting/statuses/104410921027210069",
|
||||
"inReplyTo" : "https://stereophonic.space/objects/02997b83-3ea7-4b63-94af-ef3aa2d4ed17",
|
||||
"inReplyToAtomUri" : "https://stereophonic.space/objects/02997b83-3ea7-4b63-94af-ef3aa2d4ed17",
|
||||
"published" : "2020-06-26T15:10:19Z",
|
||||
"replies" : {
|
||||
"first" : {
|
||||
"items" : [],
|
||||
"next" : "https://busshi.moe/users/tuxcrafting/statuses/104410921027210069/replies?only_other_accounts=true&page=true",
|
||||
"partOf" : "https://busshi.moe/users/tuxcrafting/statuses/104410921027210069/replies",
|
||||
"type" : "CollectionPage"
|
||||
},
|
||||
"id" : "https://busshi.moe/users/tuxcrafting/statuses/104410921027210069/replies",
|
||||
"type" : "Collection"
|
||||
},
|
||||
"sensitive" : false,
|
||||
"summary" : null,
|
||||
"tag" : [
|
||||
{
|
||||
"href" : "https://stereophonic.space/users/fixpoint",
|
||||
"name" : "@fixpoint@stereophonic.space",
|
||||
"type" : "Mention"
|
||||
},
|
||||
{
|
||||
"href" : "https://blob.cat/users/blobyoumu",
|
||||
"name" : "@blobyoumu@blob.cat",
|
||||
"type" : "Mention"
|
||||
},
|
||||
{
|
||||
"href" : "https://cawfee.club/users/grips",
|
||||
"name" : "@grips@cawfee.club",
|
||||
"type" : "Mention"
|
||||
},
|
||||
{
|
||||
"href" : "https://jaeger.website/users/igel",
|
||||
"name" : "@igel@jaeger.website",
|
||||
"type" : "Mention"
|
||||
}
|
||||
],
|
||||
"to" : [
|
||||
"https://www.w3.org/ns/activitystreams#Public"
|
||||
],
|
||||
"type" : "Note",
|
||||
"url" : "https://busshi.moe/@tuxcrafting/104410921027210069"
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
{
|
||||
"@context" : [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://social.sakamoto.gq/schemas/litepub-0.1.jsonld",
|
||||
{
|
||||
"@language" : "und"
|
||||
}
|
||||
],
|
||||
"actor" : "https://social.sakamoto.gq/users/eal",
|
||||
"attachment" : [],
|
||||
"attributedTo" : "https://social.sakamoto.gq/users/eal",
|
||||
"cc" : [
|
||||
"https://social.sakamoto.gq/users/eal/followers"
|
||||
],
|
||||
"content" : "<span class=\"h-card\"><a data-user=\"9uw2wH0iTYAMV7XnLU\" class=\"u-url mention\" href=\"https://busshi.moe/@tuxcrafting\" rel=\"ugc\">@<span>tuxcrafting</span></a></span> <span class=\"h-card\"><a data-user=\"9r5l8j8x23NI9KUFu4\" class=\"u-url mention\" href=\"https://stereophonic.space/users/fixpoint\" rel=\"ugc\">@<span>fixpoint</span></a></span> <span class=\"h-card\"><a data-user=\"9orDK545JwjY4Lxjge\" class=\"u-url mention\" href=\"https://blob.cat/users/blobyoumu\" rel=\"ugc\">@<span>blobyoumu</span></a></span> <span class=\"h-card\"><a data-user=\"68184\" class=\"u-url mention\" href=\"https://cawfee.club/users/grips\" rel=\"ugc\">@<span>grips</span></a></span> <span class=\"h-card\"><a data-user=\"9sAmMgHVKjTXKpgx84\" class=\"u-url mention\" href=\"https://jaeger.website/users/igel\" rel=\"ugc\">@<span>igel</span></a></span> What's bad about nukes?",
|
||||
"context" : "https://cawfee.club/contexts/ad6c73d8-efc2-4e74-84ea-2dacf1a27a5e",
|
||||
"conversation" : "https://cawfee.club/contexts/ad6c73d8-efc2-4e74-84ea-2dacf1a27a5e",
|
||||
"id" : "https://social.sakamoto.gq/objects/f20f2497-66d9-4a52-a2e1-1be2a39c32c1",
|
||||
"inReplyTo" : "https://busshi.moe/users/tuxcrafting/statuses/104410921027210069",
|
||||
"published" : "2020-06-26T15:20:15.975737Z",
|
||||
"sensitive" : false,
|
||||
"summary" : "",
|
||||
"tag" : [
|
||||
{
|
||||
"href" : "https://blob.cat/users/blobyoumu",
|
||||
"name" : "@blobyoumu@blob.cat",
|
||||
"type" : "Mention"
|
||||
},
|
||||
{
|
||||
"href" : "https://busshi.moe/users/tuxcrafting",
|
||||
"name" : "@tuxcrafting@busshi.moe",
|
||||
"type" : "Mention"
|
||||
},
|
||||
{
|
||||
"href" : "https://cawfee.club/users/grips",
|
||||
"name" : "@grips@cawfee.club",
|
||||
"type" : "Mention"
|
||||
},
|
||||
{
|
||||
"href" : "https://jaeger.website/users/igel",
|
||||
"name" : "@igel@jaeger.website",
|
||||
"type" : "Mention"
|
||||
},
|
||||
{
|
||||
"href" : "https://stereophonic.space/users/fixpoint",
|
||||
"name" : "@fixpoint@stereophonic.space",
|
||||
"type" : "Mention"
|
||||
}
|
||||
],
|
||||
"to" : [
|
||||
"https://busshi.moe/users/tuxcrafting",
|
||||
"https://www.w3.org/ns/activitystreams#Public",
|
||||
"https://blob.cat/users/blobyoumu",
|
||||
"https://stereophonic.space/users/fixpoint",
|
||||
"https://cawfee.club/users/grips",
|
||||
"https://jaeger.website/users/igel"
|
||||
],
|
||||
"type" : "Note"
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
{
|
||||
"@context" : [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://social.sakamoto.gq/schemas/litepub-0.1.jsonld",
|
||||
{
|
||||
"@language" : "und"
|
||||
}
|
||||
],
|
||||
"attachment" : [],
|
||||
"discoverable" : true,
|
||||
"endpoints" : {
|
||||
"oauthAuthorizationEndpoint" : "https://social.sakamoto.gq/oauth/authorize",
|
||||
"oauthRegistrationEndpoint" : "https://social.sakamoto.gq/api/v1/apps",
|
||||
"oauthTokenEndpoint" : "https://social.sakamoto.gq/oauth/token",
|
||||
"sharedInbox" : "https://social.sakamoto.gq/inbox",
|
||||
"uploadMedia" : "https://social.sakamoto.gq/api/ap/upload_media"
|
||||
},
|
||||
"followers" : "https://social.sakamoto.gq/users/eal/followers",
|
||||
"following" : "https://social.sakamoto.gq/users/eal/following",
|
||||
"icon" : {
|
||||
"type" : "Image",
|
||||
"url" : "https://social.sakamoto.gq/media/f1cb6f79bf6839f3223ca240441f766056b74ddd23c69bcaf8bb1ba1ecff6eec.jpg"
|
||||
},
|
||||
"id" : "https://social.sakamoto.gq/users/eal",
|
||||
"image" : {
|
||||
"type" : "Image",
|
||||
"url" : "https://social.sakamoto.gq/media/e5cccf26421e8366f4e34be3c9d5042b8bc8dcceccc7c8e89785fa312dd9632c.jpg"
|
||||
},
|
||||
"inbox" : "https://social.sakamoto.gq/users/eal/inbox",
|
||||
"manuallyApprovesFollowers" : false,
|
||||
"name" : "ìì",
|
||||
"outbox" : "https://social.sakamoto.gq/users/eal/outbox",
|
||||
"preferredUsername" : "eal",
|
||||
"publicKey" : {
|
||||
"id" : "https://social.sakamoto.gq/users/eal#main-key",
|
||||
"owner" : "https://social.sakamoto.gq/users/eal",
|
||||
"publicKeyPem" : "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz3pF85YOhhv2Zaxv9YQ7\nrCe1aEhetCMVHtrK63tUVGoGdsblyKnVeJNbFcr6k3y35OpHS3HXIi6GzgihYcTu\nONLP4eQMHTnLUNAQZi03mjJA4iIq8v/tm8ZkL2mXsQSAbWj6Iq518mHNN7OvCoNt\n3Xjepl/0kgkc2gsund7m8r+Wu0Fusx6UlUyyAk3PexdDRdSSlVLeskqtP8jtdQDo\nL70pMyL+VD+Qb9RKFdtgJ+M4OqYP+7FVzCqXN0QIPhFf/kvHSLr+c4Y3Wm0nAKHU\n9CwXWXz5Xqscpv41KlgnUCOkTXb5eBSt23lNulae5srVzWBiFb6guiCpNzBGa+Sq\nrwIDAQAB\n-----END PUBLIC KEY-----\n\n"
|
||||
},
|
||||
"summary" : "Pizza napoletana supremacist.<br><br>Any artworks posted here that are good are not mine.",
|
||||
"tag" : [],
|
||||
"type" : "Person",
|
||||
"url" : "https://social.sakamoto.gq/users/eal"
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
{
|
||||
"@context" : [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://w3id.org/security/v1",
|
||||
{
|
||||
"IdentityProof" : "toot:IdentityProof",
|
||||
"PropertyValue" : "schema:PropertyValue",
|
||||
"alsoKnownAs" : {
|
||||
"@id" : "as:alsoKnownAs",
|
||||
"@type" : "@id"
|
||||
},
|
||||
"discoverable" : "toot:discoverable",
|
||||
"featured" : {
|
||||
"@id" : "toot:featured",
|
||||
"@type" : "@id"
|
||||
},
|
||||
"focalPoint" : {
|
||||
"@container" : "@list",
|
||||
"@id" : "toot:focalPoint"
|
||||
},
|
||||
"manuallyApprovesFollowers" : "as:manuallyApprovesFollowers",
|
||||
"movedTo" : {
|
||||
"@id" : "as:movedTo",
|
||||
"@type" : "@id"
|
||||
},
|
||||
"schema" : "http://schema.org#",
|
||||
"toot" : "http://joinmastodon.org/ns#",
|
||||
"value" : "schema:value"
|
||||
}
|
||||
],
|
||||
"attachment" : [],
|
||||
"discoverable" : true,
|
||||
"endpoints" : {
|
||||
"sharedInbox" : "https://busshi.moe/inbox"
|
||||
},
|
||||
"featured" : "https://busshi.moe/users/tuxcrafting/collections/featured",
|
||||
"followers" : "https://busshi.moe/users/tuxcrafting/followers",
|
||||
"following" : "https://busshi.moe/users/tuxcrafting/following",
|
||||
"icon" : {
|
||||
"mediaType" : "image/jpeg",
|
||||
"type" : "Image",
|
||||
"url" : "https://blobcdn.busshi.moe/busshifiles/accounts/avatars/000/046/872/original/054f0806ccb303d0.jpg"
|
||||
},
|
||||
"id" : "https://busshi.moe/users/tuxcrafting",
|
||||
"inbox" : "https://busshi.moe/users/tuxcrafting/inbox",
|
||||
"manuallyApprovesFollowers" : true,
|
||||
"name" : "@tuxcrafting@localhost:8080",
|
||||
"outbox" : "https://busshi.moe/users/tuxcrafting/outbox",
|
||||
"preferredUsername" : "tuxcrafting",
|
||||
"publicKey" : {
|
||||
"id" : "https://busshi.moe/users/tuxcrafting#main-key",
|
||||
"owner" : "https://busshi.moe/users/tuxcrafting",
|
||||
"publicKeyPem" : "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwqWWTBf9OizsBiBhGS/M\nQTT6fB1VvQP6vvxouGZ5cGg1a97V67ouhjJ+nGMuWr++DNYjJYkk2TOynfykk0H/\n8rRSujSe3BNRKYGNzdnRJu/4XxgIE847Fqx5SijSP23JGYcn8TjeSUsN2u2YYVXK\n+Eb3Bu7DjGiqwNon6YB0h5qkGjkMSMVIFn0hZx6Z21bkfYWgra96Ok5OWf7Ck3je\nCuErlCMZcbQcHtFpBueJAxYchjNvm6fqwZxLX/NtaHdr7Fm2kin89mqzliapBlFH\nCXk7Jln6xV5I6ryggPAMzm3fuHzeo0RWlu8lrxLfARBVwaQQZS99bwqp6N9O2aUp\nYwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
},
|
||||
"summary" : "<p>expert procrastinator</p><p>trans(humanist|gender|istorized)</p><p>web: <a href=\"https://tuxcrafting.port0.org\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"\">tuxcrafting.port0.org</span><span class=\"invisible\"></span></a><br />pronouns: she/they<br />languages: french (native)/english (fluent)/hebrew (ok-ish)/esperanto (barely)</p>",
|
||||
"tag" : [],
|
||||
"type" : "Person",
|
||||
"url" : "https://busshi.moe/@tuxcrafting"
|
||||
}
|
@ -0,0 +1 @@
|
||||
HEY!
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,63 @@
|
||||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.BlockHandlingTest do
|
||||
use Pleroma.DataCase
|
||||
|
||||
alias Pleroma.Activity
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Web.ActivityPub.Transmogrifier
|
||||
|
||||
import Pleroma.Factory
|
||||
|
||||
test "it works for incoming blocks" do
|
||||
user = insert(:user)
|
||||
|
||||
data =
|
||||
File.read!("test/fixtures/mastodon-block-activity.json")
|
||||
|> Poison.decode!()
|
||||
|> Map.put("object", user.ap_id)
|
||||
|
||||
blocker = insert(:user, ap_id: data["actor"])
|
||||
|
||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||
|
||||
assert data["type"] == "Block"
|
||||
assert data["object"] == user.ap_id
|
||||
assert data["actor"] == "http://mastodon.example.org/users/admin"
|
||||
|
||||
assert User.blocks?(blocker, user)
|
||||
end
|
||||
|
||||
test "incoming blocks successfully tear down any follow relationship" do
|
||||
blocker = insert(:user)
|
||||
blocked = insert(:user)
|
||||
|
||||
data =
|
||||
File.read!("test/fixtures/mastodon-block-activity.json")
|
||||
|> Poison.decode!()
|
||||
|> Map.put("object", blocked.ap_id)
|
||||
|> Map.put("actor", blocker.ap_id)
|
||||
|
||||
{:ok, blocker} = User.follow(blocker, blocked)
|
||||
{:ok, blocked} = User.follow(blocked, blocker)
|
||||
|
||||
assert User.following?(blocker, blocked)
|
||||
assert User.following?(blocked, blocker)
|
||||
|
||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||
|
||||
assert data["type"] == "Block"
|
||||
assert data["object"] == blocked.ap_id
|
||||
assert data["actor"] == blocker.ap_id
|
||||
|
||||
blocker = User.get_cached_by_ap_id(data["actor"])
|
||||
blocked = User.get_cached_by_ap_id(data["object"])
|
||||
|
||||
assert User.blocks?(blocker, blocked)
|
||||
|
||||
refute User.following?(blocker, blocked)
|
||||
refute User.following?(blocked, blocker)
|
||||
end
|
||||
end
|
Loading…
Reference in new issue