forked from AkkomaGang/akkoma
Compare commits
766 commits
develop
...
rollback_a
Author | SHA1 | Date | |
---|---|---|---|
|
c6d5a72002 | ||
|
fd46f83d2d | ||
|
938e238ea1 | ||
|
e4925f813a | ||
|
5d34fe1868 | ||
|
75b76a0666 | ||
|
db06e445f1 | ||
|
410d50afe5 | ||
|
c69ae5f7c7 | ||
|
bb9ed51da7 | ||
|
002159fc1c | ||
|
f2ed05191c | ||
|
0e89a9ad15 | ||
|
c3a0703564 | ||
|
8e8a0f005c | ||
|
772d99c582 | ||
|
1c225bfd6e | ||
|
1b82fd95d4 | ||
|
88ce0e8b24 | ||
|
3ab3404817 | ||
|
d5125e6ce7 | ||
|
e8fca8882a | ||
|
259905a893 | ||
|
f76c1d4f70 | ||
|
91c22637de | ||
|
ee7694fa91 | ||
|
5ce7db455c | ||
|
3fbd42061c | ||
|
7d68d64d63 | ||
|
6bce88b9e7 | ||
|
2c5bc9cffd | ||
|
99ff91584d | ||
|
718ff64c3b | ||
|
90681c720d | ||
|
351b5a9df4 | ||
|
3bb78ac152 | ||
|
cf1d91c718 | ||
|
5910d58cf7 | ||
|
b3d250a70a | ||
|
e07fb6e7dc | ||
|
0840ce5671 | ||
|
d5d4c7c11d | ||
|
7aa17cd651 | ||
|
c6dff687c0 | ||
|
1d95012758 | ||
|
3311e0efed | ||
|
3dfa009ec3 | ||
|
1946b49ebe | ||
|
72d4d1b392 | ||
|
c58eb873dd | ||
|
60df2d8a97 | ||
|
fce2998481 | ||
|
96cfc9575c | ||
|
c49316faee | ||
|
0f67eab384 | ||
|
f597b1b3e6 | ||
|
3f63caee2a | ||
|
8d500977a6 | ||
|
f3253c0c6a | ||
|
3f0783c0a5 | ||
|
8db82932a7 | ||
|
8e6f2624a8 | ||
|
59eaab3e7d | ||
|
cfca9544e8 | ||
|
a3985aac91 | ||
|
301eb86b35 | ||
|
c0cfc454ba | ||
|
bb27e4134b | ||
|
4a32b584e1 | ||
|
9838790a7d | ||
|
63d00f8123 | ||
|
2554028097 | ||
|
dc7efcd08b | ||
|
62c27e0164 | ||
|
9876742358 | ||
|
452595baed | ||
|
204fd6faae | ||
|
da0c684344 | ||
|
1036acb6ae | ||
|
633a76b5b3 | ||
|
8afad1e46e | ||
|
f60cb0f771 | ||
|
eb7f4bc51b | ||
|
b6e96f63b4 | ||
|
3e8f49be67 | ||
|
1eb3ce956b | ||
|
d8e326467c | ||
|
75c9f7770f | ||
|
20790c1dd3 | ||
|
3394394e0f | ||
|
0f88c2bca4 | ||
|
d6cd447cfa | ||
|
36789986c0 | ||
|
76bdb01c18 | ||
|
f6d55e1e77 | ||
|
2614f431b9 | ||
|
542bb17258 | ||
|
747311f623 | ||
|
11d5ad24c5 | ||
|
e46c3a0595 | ||
|
9b68778887 | ||
|
f2221d539c | ||
|
915c7319c6 | ||
|
f12ddcd697 | ||
|
09ab51eebb | ||
|
7ec3469bea | ||
|
8640d217b1 | ||
|
da71092003 | ||
|
4504c81080 | ||
|
3b289a1643 | ||
|
f531099d2d | ||
|
508b438b53 | ||
|
8f3e750530 | ||
|
7f0b3161ea | ||
|
afe4bb2307 | ||
|
9d99e76a3a | ||
|
0e0c316c76 | ||
|
a69e9ae2ef | ||
|
f40ccce7e9 | ||
|
c7a0df8006 | ||
|
bb63f72c11 | ||
|
cddcafee7f | ||
|
a31d3589ed | ||
|
79bd363a68 | ||
|
db76ea578a | ||
|
a9d991d31e | ||
|
0e1356ef9c | ||
|
76ed0da09f | ||
|
2186e9b62b | ||
|
e9c3be262c | ||
|
2e0089dd5c | ||
|
a2db64b12b | ||
|
e86ca8a436 | ||
|
47b9847edd | ||
|
b2713357b9 | ||
|
39b24cdce6 | ||
|
edaf0a05f8 | ||
|
749445dd50 | ||
|
4d321be05c | ||
|
451c415fca | ||
|
1c97a86b8d | ||
|
3979eaf14a | ||
|
3d1828f43b | ||
|
f38cb4ccac | ||
|
14871fecd4 | ||
|
1b0e47b79b | ||
|
e3e68b9377 | ||
|
c2cfe0c690 | ||
|
a977e1ef96 | ||
|
7c8618dc9a | ||
|
7991364380 | ||
|
8be7f87e1f | ||
|
572751bec7 | ||
|
ceb07772d0 | ||
|
7d0175dc3a | ||
|
8a3b450397 | ||
|
6b87b3f2ea | ||
|
e7c40c2509 | ||
|
36519bdbee | ||
|
39a96876ef | ||
|
eb70676931 | ||
|
717c5901f8 | ||
|
6f047cc308 | ||
|
481f50bcfd | ||
|
648e012022 | ||
|
8d704d384d | ||
|
bdedc41cbc | ||
|
9f708037d7 | ||
|
f2e4b425e1 | ||
|
7c64f705f6 | ||
|
127e7b8ff9 | ||
|
8407e26b0c | ||
|
a57c025594 | ||
|
5a9ea98baf | ||
|
30ded8876a | ||
|
4121bca895 | ||
|
da0ef154a6 | ||
|
9fbf01f7a9 | ||
|
7a519b6a66 | ||
|
705ba6d615 | ||
|
16b06160ac | ||
|
c830282628 | ||
|
1ac9bd0b4c | ||
|
8042e0ebe1 | ||
|
dd82fd234f | ||
|
59b8c920f6 | ||
|
1b238a4fad | ||
|
1958f23fe7 | ||
|
3f1c31b7cd | ||
|
d43d02bf41 | ||
|
757a21554f | ||
|
5d7d623390 | ||
|
2d7ea263a1 | ||
|
e66c02b775 | ||
|
ac95b8b4f3 | ||
|
467b6cad6f | ||
|
1a7107f4a5 | ||
|
7f63b4c315 | ||
|
ea60c4e709 | ||
|
90d4b7d604 | ||
|
6bdf451ce8 | ||
|
ac427de851 | ||
|
0b19625bfb | ||
|
50923f5438 | ||
|
453a66f8c2 | ||
|
3d32c92b37 | ||
|
c0b265b404 | ||
|
c6bc523914 | ||
|
b8d6cb5845 | ||
|
346c130ddc | ||
|
f7c2073103 | ||
|
9874b4c985 | ||
|
cfb1bc967f | ||
|
cd237d22f1 | ||
|
f8afba95b2 | ||
|
20347898e2 | ||
|
c63cf954de | ||
|
71839cb890 | ||
|
80a2528fd1 | ||
|
4477c6baff | ||
|
257601d67d | ||
|
be411ad3bc | ||
|
d19696cf60 | ||
|
299255b9bb | ||
|
e40c221c31 | ||
|
07ef72f493 | ||
|
ec80a1e405 | ||
|
24af2e1c58 | ||
|
e124776d14 | ||
|
93ed6da4a3 | ||
|
2f301bbb87 | ||
|
6d148b6637 | ||
|
0a05ebf789 | ||
|
b439e91f57 | ||
|
e22a772240 | ||
|
21ab7369ca | ||
|
0d8c6b0488 | ||
|
9af5da6666 | ||
|
425fbce7be | ||
|
a6195c7127 | ||
|
e949378476 | ||
|
01239456a1 | ||
|
c32e28e1b0 | ||
|
20a0dd6516 | ||
|
ffd379456b | ||
|
f9b86c3c22 | ||
|
3afa1903ee | ||
|
497cd5d5da | ||
|
a546e6f042 | ||
|
780fb4514d | ||
|
84a573877a | ||
|
6811237ffd | ||
|
6f10f93d62 | ||
|
dc72a523c4 | ||
|
d67d191344 | ||
|
8ec985eea1 | ||
|
5b2e3a303c | ||
|
59109f8f74 | ||
|
47e3a72b6e | ||
|
85c1e1ff4d | ||
|
38d9ec41be | ||
|
439c1baf25 | ||
|
c59a0bd12f | ||
|
a022b9d733 | ||
|
c59ee1f172 | ||
|
4ec9eeb3f8 | ||
|
ec0e912c52 | ||
|
1218adacc5 | ||
|
b7c75db0f7 | ||
|
779457d9a4 | ||
|
a243a217a7 | ||
|
2701628786 | ||
|
f047088a93 | ||
|
4e7ed563c0 | ||
|
3885ee182a | ||
|
06678fb4ad | ||
|
cc0f32c253 | ||
|
31fd41de0c | ||
|
5a2c8ef4cc | ||
|
a31d6bb52c | ||
|
f459c1260b | ||
|
3522852c61 | ||
|
eb42e90c4f | ||
|
c62a4f1c17 | ||
|
6ccab516a3 | ||
|
0cee3c6e93 | ||
|
4661b56720 | ||
|
61254111e5 | ||
|
f41d970a59 | ||
|
88c1c76d3e | ||
|
bb02ee99f5 | ||
|
80c32ae00b | ||
|
06f9324afe | ||
|
837d4dc87f | ||
|
93f12c0d0d | ||
|
6ce3f76b5d | ||
|
514caed573 | ||
|
73b4d0d9a7 | ||
|
243ed7d60f | ||
|
cbdc13b767 | ||
|
3b6784b1de | ||
|
c559c240d1 | ||
|
def0f5dc2e | ||
|
e06f2b9f5e | ||
|
738ca484fd | ||
|
a9111bcaf2 | ||
|
7f71e3d0fe | ||
|
f3e061c964 | ||
|
a7f01ffc1d | ||
|
d487e0160c | ||
|
b53cf7d4b3 | ||
|
88e0e6acd5 | ||
|
a0166e92fa | ||
|
5d900a5cd1 | ||
|
f2a9285ff0 | ||
|
a4fa286d20 | ||
|
b2ba307f4d | ||
|
7299795eb4 | ||
|
f8540b0a9d | ||
|
99d4823ab1 | ||
|
cc533e6956 | ||
|
7de21ec991 | ||
|
5ef2dc317d | ||
|
c80096522c | ||
|
b5266097a1 | ||
|
5d3d6a58f7 | ||
|
0814d0e0cb | ||
|
0f9f3d2897 | ||
|
18d6a58c7e | ||
|
7167de592e | ||
|
4bdd8e349c | ||
|
36d79468ec | ||
|
b99f5d6183 | ||
|
5153eba3a8 | ||
|
fb3f6e1975 | ||
|
01d396585e | ||
|
d39f803bdd | ||
|
388bbc4978 | ||
|
997f08b350 | ||
|
d877d2a4e7 | ||
|
82c8fc1ede | ||
|
46a5c06853 | ||
|
fc7ce5f93c | ||
|
dce7e42928 | ||
|
0a337063e1 | ||
|
cd19537f39 | ||
|
eba9b0760f | ||
|
301ce5bc62 | ||
|
21e587ff1a | ||
|
cfb21d011f | ||
|
e077da27fe | ||
|
c057ec6878 | ||
|
4217ac4074 | ||
|
1b091c7950 | ||
|
0ad115ddf0 | ||
|
a543161ba9 | ||
|
2fffca8ef3 | ||
|
13e41ab8ba | ||
|
ca8341a96c | ||
|
5ca95a4f1a | ||
|
aff4d5df1c | ||
|
48bd45acec | ||
|
0b2243f17e | ||
|
9399fd4abd | ||
|
54cf23f2f8 | ||
|
8b55661ae6 | ||
|
8c3684ee8c | ||
|
bc488824f8 | ||
|
77ebde450e | ||
|
21bd168226 | ||
|
6da0b50645 | ||
|
37ea9e014a | ||
|
99ad602577 | ||
|
cc40640f54 | ||
|
ffe8459349 | ||
|
3b2bac7a0f | ||
|
eba1666575 | ||
|
09e0304b9c | ||
|
be98900904 | ||
|
c589b8445f | ||
|
454f892f37 | ||
|
4350a205a4 | ||
|
1f18ab36b5 | ||
|
fff7571e0d | ||
|
65a5c713e9 | ||
|
ba31af021c | ||
|
9a6280cdb9 | ||
|
3da1b2548d | ||
|
1a67a20364 | ||
|
f9fc3a153d | ||
|
ce0a6737e7 | ||
|
97e8c8a10a | ||
|
d24d74b1a7 | ||
|
db789acf1e | ||
|
d622fe8d48 | ||
|
02b4b4da47 | ||
|
02947bafeb | ||
|
ad730c2135 | ||
|
2baf3084a1 | ||
|
92da9c4a47 | ||
|
275c60208b | ||
|
2c7eed122e | ||
|
fb268c4378 | ||
|
3193f18cf3 | ||
|
bb4860e222 | ||
|
64e16e6a4b | ||
|
8aba7c08d1 | ||
|
eb4b7f6efa | ||
|
597f56b4c4 | ||
|
8113dd31ee | ||
|
8371fd8ca2 | ||
|
1d7e8d6e01 | ||
|
28626eafc1 | ||
|
c045a49909 | ||
|
44d14e8a9c | ||
|
3fb9171694 | ||
|
074a94e90d | ||
|
7473868880 | ||
|
20588517fc | ||
|
36f6d92d98 | ||
|
b2a0718e83 | ||
|
9022d855cd | ||
|
8ddea16b0d | ||
|
fdc71f6051 | ||
|
eb2a1652bf | ||
|
c1874bc8f9 | ||
|
12d888e04e | ||
|
6e158bba2c | ||
|
e574408b33 | ||
|
702a41ce23 | ||
|
08c8814ef0 | ||
|
311fda32f3 | ||
|
8bb2e52d2e | ||
|
420da14b61 | ||
|
3cf6c2b7ea | ||
|
2efc0ffcf0 | ||
|
04ded94a50 | ||
|
26080b4b5c | ||
|
0b16ce79f9 | ||
|
11a6e88420 | ||
|
069554e925 | ||
|
6e7b919637 | ||
|
f84ed44cea | ||
|
0d4aceb9b0 | ||
|
f88ed1df75 | ||
|
6ef38c6523 | ||
|
29f4ab640b | ||
|
8c78fef56f | ||
|
5ce118d970 | ||
|
4367489a3e | ||
|
4edc867b87 | ||
|
c50ade26ba | ||
|
eefa981e0a | ||
|
de37583c49 | ||
|
a15b45a589 | ||
|
6b937d1473 | ||
|
c3a0944ce5 | ||
|
42d4bd3a5d | ||
|
15748fd301 | ||
|
51f87ba30c | ||
|
c0e4b1b3e2 | ||
|
56227ef7ba | ||
|
8c761942b1 | ||
|
4a9ed319b8 | ||
|
7d234d097c | ||
|
81afaee374 | ||
|
75ea766824 | ||
|
cc5686bbd6 | ||
|
d0d48a9e88 | ||
|
8303af84ce | ||
|
551721e41a | ||
|
cd316d7269 | ||
|
0d697bc15a | ||
|
37fdf148b0 | ||
|
11f9f2ef27 | ||
|
014096aeef | ||
|
5321fd0012 | ||
|
9c6dae942d | ||
|
e98579b1da | ||
|
40953a8f5c | ||
|
99a6f50316 | ||
|
e0d6da4e7d | ||
|
ee07383191 | ||
|
01321c88b5 | ||
|
06da000c5d | ||
|
4e4eb81749 | ||
|
211e561e2a | ||
|
143ea7b80a | ||
|
e21ef5aef3 | ||
|
34adea8d28 | ||
|
a1c8aa4721 | ||
|
eab13fed3e | ||
|
e45faddb38 | ||
|
edf0013ff3 | ||
|
bb61cfee8d | ||
|
7cf473c500 | ||
|
7adfc2e0f4 | ||
|
9da81f41c6 | ||
|
c842e62675 | ||
|
ecd42a2ce1 | ||
|
0ee8f33250 | ||
|
34a98990db | ||
|
4cb0dbb5dc | ||
|
cbb26262a5 | ||
|
3f26f1b30f | ||
|
14e697a64f | ||
|
e102d25d23 | ||
|
cb60cc4e02 | ||
|
5a65e2dac5 | ||
|
b1ff5241c2 | ||
|
8a9144ca8b | ||
|
9f6c364759 | ||
|
5b19543f0a | ||
|
b0f83aea29 | ||
|
44613db853 | ||
|
95b3922328 | ||
|
7451f0e81f | ||
|
27f3d802f2 | ||
|
c3593639ad | ||
|
aafd7a687d | ||
|
237b220d71 | ||
|
75f912c63f | ||
|
d2d3532e5f | ||
|
532f6ae3ed | ||
|
06a3998013 | ||
|
97eabb2047 | ||
|
fe2d4778ee | ||
|
72ac940618 | ||
|
3249ac1f12 | ||
|
fdaa864083 | ||
|
8bac8147d4 | ||
|
b096fbba1a | ||
|
fa31ae50e6 | ||
|
410e177b2a | ||
|
b613a9ec6b | ||
|
6f23fc8e08 | ||
|
a158774364 | ||
|
393b508846 | ||
|
c004eb0fa2 | ||
|
8acfe95f3e | ||
|
5e8aac0e07 | ||
|
0f6a5eb9a2 | ||
|
547def67a7 | ||
|
7466136ad3 | ||
|
5ca1ac041f | ||
|
5951d637a9 | ||
|
fffd9059d6 | ||
|
a4659d993d | ||
|
e3e8ff06f9 | ||
|
c04c7f9e45 | ||
|
33ced2c2ed | ||
|
bdca5f5d68 | ||
|
b128e1d6c5 | ||
|
5086d6d5e9 | ||
|
a74ce2d77a | ||
|
39c47073a3 | ||
|
e606b9ab3f | ||
|
7977dd6ac7 | ||
|
f1722a9f4a | ||
|
6e5ef7f2eb | ||
|
38444aa92a | ||
|
4605efe272 | ||
|
a8093732bd | ||
|
221cb3fb81 | ||
|
aa51fd068b | ||
|
fe933b9bf2 | ||
|
466568ae36 | ||
|
826deb7375 | ||
|
38af42968d | ||
|
c48be59f58 | ||
|
214ef7ff73 | ||
|
f9943b2065 | ||
|
57c030a0a7 | ||
|
e2d24eda57 | ||
|
c3b2b71ea2 | ||
|
b22843a982 | ||
|
57c486014c | ||
|
fa3157df96 | ||
|
4d482b765f | ||
|
85cbf773f0 | ||
|
8517bc18aa | ||
|
be08d9305b | ||
|
6599607226 | ||
|
a5d7e98de0 | ||
|
5f37db330f | ||
|
7d1dae3bef | ||
|
fbf9eced11 | ||
|
4194559ea6 | ||
|
d7c53da77a | ||
|
e63d49d238 | ||
|
b76340511d | ||
|
d0c1997d48 | ||
|
0c78ab4a88 | ||
|
83338c25a5 | ||
|
030183b35f | ||
|
4ea9886faa | ||
|
2db640632b | ||
|
31ff467eff | ||
|
ffe081bf44 | ||
|
6754d1f272 | ||
|
ebcda5265b | ||
|
0e0a1758f7 | ||
|
eb1a29640f | ||
|
11a1996bf5 | ||
|
881179ec72 | ||
|
d569694ae9 | ||
|
cf8334dbc1 | ||
|
fcf3c9057e | ||
|
009817c9ee | ||
|
2b39b36e49 | ||
|
aa1fff279e | ||
|
5169ad8f14 | ||
|
c867d23250 | ||
|
d7af67012f | ||
|
cdc5bbe836 | ||
|
4458db3201 | ||
|
ee32e36b01 | ||
|
79ccb6b999 | ||
|
89667189b8 | ||
|
9b69ccb35b | ||
|
cd42e2bed0 | ||
|
aca11fb70e | ||
|
7ea330b4fe | ||
|
d3f3f30c6a | ||
|
bc59da96c5 | ||
|
8de573b047 | ||
|
1a917cfeec | ||
|
5e38887080 | ||
|
e644f8dea5 | ||
|
396f036b13 | ||
|
0149ea4538 | ||
|
af82f09ce3 | ||
|
8b0c2890f9 | ||
|
1deab33fb0 | ||
|
32e4aa42d3 | ||
|
0b686c6e54 | ||
|
9c52a496f7 | ||
|
fdbf9b06e5 | ||
|
cadca083ea | ||
|
50a316cd63 | ||
|
f63d9b7835 | ||
|
0cc6557716 | ||
|
1edbda39e1 | ||
|
ee05abe052 | ||
|
17aa3644be | ||
|
56197192bb | ||
|
6ba93c2cb3 | ||
|
9f4c5743e8 | ||
|
2fa1ca84e6 | ||
|
a867107437 | ||
|
0fd3695b9c | ||
|
d91e9cee04 | ||
|
061cb749cd | ||
|
fa8e2ffa3f | ||
|
e473bcf7a0 | ||
|
60deddb7e5 | ||
|
7c044a1841 | ||
|
d1cc9e4eaf | ||
|
71c80204c9 | ||
|
bd81af731e | ||
|
2d77976305 | ||
|
5a4e3aa715 | ||
|
61dfeca1cc | ||
|
de99fd7804 | ||
|
f8f2a17754 | ||
|
64944c164f | ||
|
3bf257171f | ||
|
a146f6acab | ||
|
27cb3d6273 | ||
|
2bab9dd175 | ||
|
a4de79ced0 | ||
|
8951be7710 | ||
|
0604b0dd09 | ||
|
0f4e0e667e | ||
|
99e9c2c668 | ||
|
65b4d2ce84 | ||
|
ab12a05a43 | ||
|
c1ae35ff2c | ||
|
dd7977bb68 | ||
|
249fe88d12 | ||
|
267184b70e | ||
|
c5a20c80c4 | ||
|
d5644a52aa | ||
|
1bbc701a3a | ||
|
19d557c870 | ||
|
53de3a9d44 | ||
|
7b87cac6cc | ||
|
75c4fefb1c | ||
|
1dba3bc4dc | ||
|
61bae9a407 | ||
|
e3d394eef6 | ||
|
0266bc3c96 | ||
|
aaa9314f4c | ||
|
9983799ccb | ||
|
98ce239ebc | ||
|
66e8c6f90f | ||
|
7a015b1fe2 | ||
|
263b42a73d | ||
|
78c6aeee1b | ||
|
f5d4ef50b4 | ||
|
8328289619 | ||
|
7b56690af4 | ||
|
6ffe43af70 | ||
|
560bcd58ab | ||
|
00523bdf5e | ||
|
88c21b9282 | ||
|
9faac1094f | ||
|
787a02c4b1 | ||
|
74cf0f0355 | ||
|
a02cfd7f52 | ||
|
c180f9276f | ||
|
dfb2808535 | ||
|
397f67fef8 | ||
|
70fbd1f09e | ||
|
1dfb67f1e0 | ||
|
69b089c894 | ||
|
b108b05650 | ||
|
72d5e29117 | ||
|
ac434f83c3 | ||
|
ecdc81b37a | ||
|
39c5ebb1f6 | ||
|
cd8f1aac47 | ||
|
31148c1857 | ||
|
db90c9e3b0 | ||
|
d5eb44e8b3 | ||
|
790081540d | ||
|
71baa713bc | ||
|
6284353025 | ||
|
8b5a658991 | ||
|
a4436bcc3f | ||
|
84dcb55b0f | ||
|
eedf551eed | ||
|
0f90fd5805 | ||
|
62a45747d9 | ||
|
b34f0a6e51 | ||
|
e4cfdfd701 | ||
|
a98a127718 | ||
|
ea204dbca1 | ||
|
f4bc2f5975 | ||
|
cd3175c7fe | ||
|
bf0b32c9aa | ||
|
4f249b2397 | ||
|
753a9b3f32 | ||
|
fd043b0ab3 | ||
|
991b26f494 | ||
|
dafcf896d9 | ||
|
ffeae7ef2c | ||
|
9032d065e6 | ||
|
9a27cb4f9d | ||
|
3fd13b70ec | ||
|
eb383ef8d3 | ||
|
a677c621e8 | ||
|
4f44fd32ea | ||
|
e41eee5ed1 | ||
|
1d8abf2511 | ||
|
54d7b4354c | ||
|
c1aa3c98ac | ||
|
60081a8818 | ||
|
3092558bc1 | ||
|
df90b3e66a | ||
|
0af77b20c1 | ||
|
8ef1d8b566 | ||
|
a9b0027071 | ||
|
07bf36142b | ||
|
a24b2bc38a | ||
|
590a10af33 |
|
@ -83,6 +83,7 @@
|
||||||
# lanodan: I think PreferImplicitTry should be consistency, and the behaviour seems
|
# lanodan: I think PreferImplicitTry should be consistency, and the behaviour seems
|
||||||
# inconsistent, see: https://github.com/rrrene/credo/issues/224
|
# inconsistent, see: https://github.com/rrrene/credo/issues/224
|
||||||
{Credo.Check.Readability.PreferImplicitTry, false},
|
{Credo.Check.Readability.PreferImplicitTry, false},
|
||||||
|
{Credo.Check.Readability.PipeIntoAnonymousFunctions, exit_status: 0},
|
||||||
{Credo.Check.Readability.RedundantBlankLines},
|
{Credo.Check.Readability.RedundantBlankLines},
|
||||||
{Credo.Check.Readability.StringSigils},
|
{Credo.Check.Readability.StringSigils},
|
||||||
{Credo.Check.Readability.TrailingBlankLine},
|
{Credo.Check.Readability.TrailingBlankLine},
|
||||||
|
@ -90,6 +91,7 @@
|
||||||
{Credo.Check.Readability.VariableNames},
|
{Credo.Check.Readability.VariableNames},
|
||||||
{Credo.Check.Readability.Semicolons},
|
{Credo.Check.Readability.Semicolons},
|
||||||
{Credo.Check.Readability.SpaceAfterCommas},
|
{Credo.Check.Readability.SpaceAfterCommas},
|
||||||
|
{Credo.Check.Readability.WithSingleClause, exit_status: 0},
|
||||||
{Credo.Check.Refactor.DoubleBooleanNegation},
|
{Credo.Check.Refactor.DoubleBooleanNegation},
|
||||||
{Credo.Check.Refactor.CondStatements},
|
{Credo.Check.Refactor.CondStatements},
|
||||||
{Credo.Check.Refactor.CyclomaticComplexity},
|
{Credo.Check.Refactor.CyclomaticComplexity},
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -48,6 +48,7 @@ docs/generated_config.md
|
||||||
# Code test coverage
|
# Code test coverage
|
||||||
/cover
|
/cover
|
||||||
/Elixir.*.coverdata
|
/Elixir.*.coverdata
|
||||||
|
/coverage.xml
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
pleroma.iml
|
pleroma.iml
|
||||||
|
|
|
@ -5,6 +5,7 @@ variables: &global_variables
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
|
DB_PORT: 5432
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
|
|
||||||
cache: &global_cache_policy
|
cache: &global_cache_policy
|
||||||
|
@ -34,7 +35,8 @@ after_script:
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: &build_changes_policy
|
||||||
|
- ".gitlab-ci.yml"
|
||||||
- "**/*.ex"
|
- "**/*.ex"
|
||||||
- "**/*.exs"
|
- "**/*.exs"
|
||||||
- "mix.lock"
|
- "mix.lock"
|
||||||
|
@ -45,6 +47,7 @@ spec-build:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
|
- ".gitlab-ci.yml"
|
||||||
- "lib/pleroma/web/api_spec/**/*.ex"
|
- "lib/pleroma/web/api_spec/**/*.ex"
|
||||||
- "lib/pleroma/web/api_spec.ex"
|
- "lib/pleroma/web/api_spec.ex"
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -59,7 +62,7 @@ benchmark:
|
||||||
variables:
|
variables:
|
||||||
MIX_ENV: benchmark
|
MIX_ENV: benchmark
|
||||||
services:
|
services:
|
||||||
- name: postgres:9.6
|
- name: postgres:9.6-alpine
|
||||||
alias: postgres
|
alias: postgres
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
script:
|
script:
|
||||||
|
@ -70,37 +73,38 @@ benchmark:
|
||||||
unit-testing:
|
unit-testing:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: &testing_cache_policy
|
cache: &testing_cache_policy
|
||||||
<<: *global_cache_policy
|
<<: *global_cache_policy
|
||||||
policy: pull
|
policy: pull
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: postgres:13
|
- name: postgres:13-alpine
|
||||||
alias: postgres
|
alias: postgres
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
script:
|
script:
|
||||||
- mix ecto.create
|
- mix ecto.create
|
||||||
- mix ecto.migrate
|
- mix ecto.migrate
|
||||||
- mix coveralls --preload-modules
|
- mix test --cover --preload-modules
|
||||||
|
coverage: '/^Line total: ([^ ]*%)$/'
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
coverage_report:
|
||||||
|
coverage_format: cobertura
|
||||||
|
path: coverage.xml
|
||||||
|
|
||||||
unit-testing-erratic:
|
unit-testing-erratic:
|
||||||
stage: test
|
stage: test
|
||||||
retry: 2
|
retry: 2
|
||||||
|
allow_failure: true
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: &testing_cache_policy
|
cache: &testing_cache_policy
|
||||||
<<: *global_cache_policy
|
<<: *global_cache_policy
|
||||||
policy: pull
|
policy: pull
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: postgres:13
|
- name: postgres:13-alpine
|
||||||
alias: postgres
|
alias: postgres
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
script:
|
script:
|
||||||
|
@ -127,10 +131,7 @@ unit-testing-erratic:
|
||||||
unit-testing-rum:
|
unit-testing-rum:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: *testing_cache_policy
|
cache: *testing_cache_policy
|
||||||
services:
|
services:
|
||||||
- name: minibikini/postgres-with-rum:12
|
- name: minibikini/postgres-with-rum:12
|
||||||
|
@ -146,15 +147,14 @@ unit-testing-rum:
|
||||||
- mix test --preload-modules
|
- mix test --preload-modules
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
image: elixir:1.12
|
image: ¤t_elixir elixir:1.12-alpine
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: *testing_cache_policy
|
cache: *testing_cache_policy
|
||||||
before_script:
|
before_script: ¤t_bfr_script
|
||||||
|
- apk update
|
||||||
|
- apk add build-base cmake file-dev git openssl
|
||||||
- mix local.hex --force
|
- mix local.hex --force
|
||||||
- mix local.rebar --force
|
- mix local.rebar --force
|
||||||
- mix deps.get
|
- mix deps.get
|
||||||
|
@ -164,29 +164,18 @@ lint:
|
||||||
analysis:
|
analysis:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: *testing_cache_policy
|
cache: *testing_cache_policy
|
||||||
script:
|
script:
|
||||||
- mix credo --strict --only=warnings,todo,fixme,consistency,readability
|
- mix credo --strict --only=warnings,todo,fixme,consistency,readability
|
||||||
|
|
||||||
cycles:
|
cycles:
|
||||||
|
image: *current_elixir
|
||||||
stage: test
|
stage: test
|
||||||
image: elixir:1.11
|
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: {}
|
cache: {}
|
||||||
before_script:
|
before_script: *current_bfr_script
|
||||||
- mix local.hex --force
|
|
||||||
- mix local.rebar --force
|
|
||||||
- mix deps.get
|
|
||||||
- apt-get update
|
|
||||||
- apt-get install cmake libmagic-dev -y
|
|
||||||
script:
|
script:
|
||||||
- mix compile
|
- mix compile
|
||||||
- mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}'
|
- mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}'
|
||||||
|
@ -265,12 +254,14 @@ stop_review_app:
|
||||||
|
|
||||||
amd64:
|
amd64:
|
||||||
stage: release
|
stage: release
|
||||||
image: elixir:1.10.4
|
image: elixir:1.11.4
|
||||||
only: &release-only
|
only: &release-only
|
||||||
- stable@pleroma/pleroma
|
- stable@pleroma/pleroma
|
||||||
- develop@pleroma/pleroma
|
- develop@pleroma/pleroma
|
||||||
- /^maint/.*$/@pleroma/pleroma
|
- /^maint/.*$/@pleroma/pleroma
|
||||||
- /^release/.*$/@pleroma/pleroma
|
- /^release/.*$/@pleroma/pleroma
|
||||||
|
tags:
|
||||||
|
- amd64
|
||||||
artifacts: &release-artifacts
|
artifacts: &release-artifacts
|
||||||
name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
||||||
paths:
|
paths:
|
||||||
|
@ -289,7 +280,7 @@ amd64:
|
||||||
MIX_ENV: prod
|
MIX_ENV: prod
|
||||||
before_script: &before-release
|
before_script: &before-release
|
||||||
- apt-get update && apt-get install -y cmake libmagic-dev
|
- apt-get update && apt-get install -y cmake libmagic-dev
|
||||||
- echo "import Mix.Config" > config/prod.secret.exs
|
- echo "import Config" > config/prod.secret.exs
|
||||||
- mix local.hex --force
|
- mix local.hex --force
|
||||||
- mix local.rebar --force
|
- mix local.rebar --force
|
||||||
script: &release
|
script: &release
|
||||||
|
@ -303,12 +294,14 @@ amd64-musl:
|
||||||
stage: release
|
stage: release
|
||||||
artifacts: *release-artifacts
|
artifacts: *release-artifacts
|
||||||
only: *release-only
|
only: *release-only
|
||||||
image: elixir:1.10.4-alpine
|
image: elixir:1.11.4-alpine
|
||||||
|
tags:
|
||||||
|
- amd64
|
||||||
cache: *release-cache
|
cache: *release-cache
|
||||||
variables: *release-variables
|
variables: *release-variables
|
||||||
before_script: &before-release-musl
|
before_script: &before-release-musl
|
||||||
- apk add git gcc g++ musl-dev make cmake file-dev
|
- apk add git build-base cmake file-dev openssl
|
||||||
- echo "import Mix.Config" > config/prod.secret.exs
|
- echo "import Config" > config/prod.secret.exs
|
||||||
- mix local.hex --force
|
- mix local.hex --force
|
||||||
- mix local.rebar --force
|
- mix local.rebar --force
|
||||||
script: *release
|
script: *release
|
||||||
|
@ -319,7 +312,7 @@ arm:
|
||||||
only: *release-only
|
only: *release-only
|
||||||
tags:
|
tags:
|
||||||
- arm32-specified
|
- arm32-specified
|
||||||
image: arm32v7/elixir:1.10.4
|
image: arm32v7/elixir:1.11.4
|
||||||
cache: *release-cache
|
cache: *release-cache
|
||||||
variables: *release-variables
|
variables: *release-variables
|
||||||
before_script: *before-release
|
before_script: *before-release
|
||||||
|
@ -331,7 +324,7 @@ arm-musl:
|
||||||
only: *release-only
|
only: *release-only
|
||||||
tags:
|
tags:
|
||||||
- arm32-specified
|
- arm32-specified
|
||||||
image: arm32v7/elixir:1.10.4-alpine
|
image: arm32v7/elixir:1.11.4-alpine
|
||||||
cache: *release-cache
|
cache: *release-cache
|
||||||
variables: *release-variables
|
variables: *release-variables
|
||||||
before_script: *before-release-musl
|
before_script: *before-release-musl
|
||||||
|
@ -343,7 +336,7 @@ arm64:
|
||||||
only: *release-only
|
only: *release-only
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- arm
|
||||||
image: arm64v8/elixir:1.10.4
|
image: arm64v8/elixir:1.11.4
|
||||||
cache: *release-cache
|
cache: *release-cache
|
||||||
variables: *release-variables
|
variables: *release-variables
|
||||||
before_script: *before-release
|
before_script: *before-release
|
||||||
|
@ -355,7 +348,7 @@ arm64-musl:
|
||||||
only: *release-only
|
only: *release-only
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- arm
|
||||||
image: arm64v8/elixir:1.10.4-alpine
|
image: arm64v8/elixir:1.11.4-alpine
|
||||||
cache: *release-cache
|
cache: *release-cache
|
||||||
variables: *release-variables
|
variables: *release-variables
|
||||||
before_script: *before-release-musl
|
before_script: *before-release-musl
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
### Release checklist
|
### Release checklist
|
||||||
* [ ] Bump version in `mix.exs`
|
* [ ] Bump version in `mix.exs`
|
||||||
* [ ] Compile a changelog
|
* [ ] Compile a changelog
|
||||||
* [ ] Create an MR with an announcement to pleroma.social
|
* [ ] Create an MR with an announcement to pleroma.social
|
||||||
* [ ] Tag the release
|
#### post-merge
|
||||||
|
* [ ] Tag the release on the merge commit
|
||||||
|
* [ ] Make the tag into a Gitlab Release™
|
||||||
* [ ] Merge `stable` into `develop` (in case the fixes are already in develop, use `git merge -s ours --no-commit` and manually merge the changelogs)
|
* [ ] Merge `stable` into `develop` (in case the fixes are already in develop, use `git merge -s ours --no-commit` and manually merge the changelogs)
|
||||||
|
|
90
CHANGELOG.md
90
CHANGELOG.md
|
@ -6,18 +6,53 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
## 2.5.1
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Allow customizing instance languages
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Security: uploading HTTP endpoint can no longer create directories in the upload dir (internal APIs, like backup, still can do it.)
|
||||||
|
- ~ character in urls in Markdown posts are handled properly
|
||||||
|
- Exiftool upload filter will now ignore SVG files
|
||||||
|
- Fix `block_from_stranger` setting
|
||||||
|
- Fix rel="me"
|
||||||
|
- Docker images will now run properly
|
||||||
|
- Fix inproper content being cached in report content
|
||||||
|
- Notification filter on object content will not operate on the ones that inherently have no content
|
||||||
|
- ZWNJ and double dots in links are parsed properly for Plain-text posts
|
||||||
|
- OTP releases will work on systems with a newer libcrypt
|
||||||
|
- Errors when running Exiftool.ReadDescription filter will not be filled into the image description
|
||||||
|
|
||||||
|
## 2.5.0 - 2022-12-23
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
- MastoFE
|
- MastoFE
|
||||||
|
- Quack, the logging backend that pushes to Slack channels
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- **Breaking:** Elixir >=1.11 is now required (was >= 1.9)
|
||||||
- Allow users to remove their emails if instance does not need email to register
|
- Allow users to remove their emails if instance does not need email to register
|
||||||
|
- Uploadfilter `Pleroma.Upload.Filter.Exiftool` has been renamed to `Pleroma.Upload.Filter.Exiftool.StripLocation`
|
||||||
|
- **Breaking**: `/api/v1/pleroma/backups` endpoints now requires `read:backups` scope instead of `read:accounts`
|
||||||
|
- Updated the recommended pleroma.vcl configuration for Varnish to target Varnish 7.0+
|
||||||
|
- Set timeout values for Oban queues. The default is infinity and some operations may not time out on their own.
|
||||||
|
- Delete activities are federated at lowest priority
|
||||||
|
- CSP now includes wasm-unsafe-eval
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- `activeMonth` and `activeHalfyear` fields in NodeInfo usage.users object
|
- `activeMonth` and `activeHalfyear` fields in NodeInfo usage.users object
|
||||||
- Experimental support for Finch. Put `config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}` in your secrets file to use it. Reverse Proxy will still use Hackney.
|
- Experimental support for Finch. Put `config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}` in your secrets file to use it. Reverse Proxy will still use Hackney.
|
||||||
- AdminAPI: allow moderators to manage reports, users, invites, and custom emojis
|
- `ForceMentionsInPostContent` MRF policy
|
||||||
- AdminAPI: restrict moderators to access sensitive data: change user credentials, get password reset token, read private statuses and chats, etc
|
|
||||||
- PleromaAPI: Add remote follow API endpoint at `POST /api/v1/pleroma/remote_interaction`
|
- PleromaAPI: Add remote follow API endpoint at `POST /api/v1/pleroma/remote_interaction`
|
||||||
- MastoAPI: Add `GET /api/v1/accounts/lookup`
|
- MastoAPI: Add `GET /api/v1/accounts/lookup`
|
||||||
- MastoAPI: Profile Directory support
|
- MastoAPI: Profile Directory support
|
||||||
|
@ -25,12 +60,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Ability to log slow Ecto queries by configuring `:pleroma, :telemetry, :slow_queries_logging`
|
- Ability to log slow Ecto queries by configuring `:pleroma, :telemetry, :slow_queries_logging`
|
||||||
- Added Phoenix LiveDashboard at `/phoenix/live_dashboard`
|
- Added Phoenix LiveDashboard at `/phoenix/live_dashboard`
|
||||||
- Added `/manifest.json` for progressive web apps.
|
- Added `/manifest.json` for progressive web apps.
|
||||||
|
- MastoAPI: Support for `birthday` and `show_birthday` field in `/api/v1/accounts/update_credentials`.
|
||||||
|
- Configuration: Add `birthday_required` and `birthday_min_age` settings to provide a way to require users to enter their birth date.
|
||||||
|
- PleromaAPI: Add `GET /api/v1/pleroma/birthdays` API endpoint
|
||||||
|
- Make backend-rendered pages translatable. This includes emails. Pages returned as a HTTP response are translated using the language specified in the `userLanguage` cookie, or the `Accept-Language` header. Emails are translated using the `language` field when registering. This language can be changed by `PATCH /api/v1/accounts/update_credentials` with the `language` field.
|
||||||
|
- Add fine grained options to provide privileges to moderators and admins (e.g. delete messages, manage reports...)
|
||||||
|
- Uploadfilter `Pleroma.Upload.Filter.Exiftool.ReadDescription` returns description values to the FE so they can pre fill the image description field
|
||||||
|
- Added move account API
|
||||||
|
- Enable remote users to interact with posts
|
||||||
|
- Possibility to discover users like `user@example.org`, while Pleroma is working on `pleroma.example.org`. Additional configuration required.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
|
- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
|
||||||
- Handle Reject for already-accepted Follows properly
|
- Handle Reject for already-accepted Follows properly
|
||||||
- Display OpenGraph data on alternative notice routes.
|
- Display OpenGraph data on alternative notice routes.
|
||||||
- Fix replies count for remote replies
|
- Fix replies count for remote replies
|
||||||
|
- Fixed hashtags disappearing from the end of lines when Markdown is enabled
|
||||||
- ChatAPI: Add link headers
|
- ChatAPI: Add link headers
|
||||||
- Limited number of search results to 40 to prevent DoS attacks
|
- Limited number of search results to 40 to prevent DoS attacks
|
||||||
- ActivityPub: fixed federation of attachment dimensions
|
- ActivityPub: fixed federation of attachment dimensions
|
||||||
|
@ -39,8 +84,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Fixed crash when pinned_objects is nil
|
- Fixed crash when pinned_objects is nil
|
||||||
- Fixed slow timelines when there are a lot of deactivated users
|
- Fixed slow timelines when there are a lot of deactivated users
|
||||||
- Fixed account deletion API
|
- Fixed account deletion API
|
||||||
|
- Fixed lowercase HTTP HEAD method in the Media Proxy Preview code
|
||||||
|
- Removed useless notification call on Delete activities
|
||||||
|
- Improved performance for filtering out deactivated and invisible users
|
||||||
|
- RSS and Atom feeds for users work again
|
||||||
|
- TwitterCard meta tags conformance
|
||||||
|
|
||||||
### Removed
|
## 2.4.5 - 2022-11-27
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
- Image `class` attributes not being scrubbed, allowing to exploit frontend special classes [!3792](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3792)
|
||||||
|
- Delete report notifs when demoting from superuser [!3642](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3642)
|
||||||
|
- Validate `mediaType` only by it's format rather than using a list [!3597](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3597)
|
||||||
|
- Pagination: Make mutes and blocks lists behave the same as other lists [!3693](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3693)
|
||||||
|
- Compatibility with Elixir 1.14 [!3740](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3740)
|
||||||
|
- Frontend installer: FediFE build URL [!3736](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3736)
|
||||||
|
- Streaming: Don't stream ChatMessage into the home timeline [!3738](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3738)
|
||||||
|
- Streaming: Stream local-only posts in the local timeline [!3738](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3738)
|
||||||
|
- Signatures: Fix `keyId` lookup for GoToSocial [!3725](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3725)
|
||||||
|
- Validator: Fix `replies` handling for GoToSocial [!3725](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3725)
|
||||||
|
|
||||||
|
## 2.4.4 - 2022-08-19
|
||||||
|
|
||||||
|
### Security
|
||||||
|
- Streaming API sessions will now properly disconnect if the corresponding token is revoked
|
||||||
|
|
||||||
|
## 2.4.3 - 2022-05-06
|
||||||
|
|
||||||
|
### Security
|
||||||
|
- Private `/objects/` and `/activities/` leaking if cached by authenticated user
|
||||||
|
- SweetXML library DTD bomb
|
||||||
|
|
||||||
|
## 2.4.2 - 2022-01-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Federation issues caused by HTTP pool checkout timeouts
|
||||||
|
- Compatibility with Elixir 1.13
|
||||||
|
|
||||||
|
### Upgrade notes
|
||||||
|
|
||||||
|
1. Restart Pleroma
|
||||||
|
|
||||||
## 2.4.1 - 2021-08-29
|
## 2.4.1 - 2021-08-29
|
||||||
|
|
||||||
|
@ -75,6 +158,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Improved Twittercard and OpenGraph meta tag generation including thumbnails and image dimension metadata when available.
|
- Improved Twittercard and OpenGraph meta tag generation including thumbnails and image dimension metadata when available.
|
||||||
- AdminAPI: sort users so the newest are at the top.
|
- AdminAPI: sort users so the newest are at the top.
|
||||||
- ActivityPub Client-to-Server(C2S): Limitation on the type of Activity/Object are lifted as they are now passed through ObjectValidators
|
- ActivityPub Client-to-Server(C2S): Limitation on the type of Activity/Object are lifted as they are now passed through ObjectValidators
|
||||||
|
- MRF (`AntiFollowbotPolicy`): Bot accounts are now also considered followbots. Users can still allow bots to follow them by first following the bot.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
6
COPYING
6
COPYING
|
@ -1,11 +1,11 @@
|
||||||
Unless otherwise stated this repository is copyright © 2017-2021
|
Unless otherwise stated this repository is copyright © 2017-2022
|
||||||
Pleroma Authors <https://pleroma.social/>, and is distributed under
|
Pleroma Authors <https://pleroma.social/>, and is distributed under
|
||||||
The GNU Affero General Public License Version 3, you should have received a
|
The GNU Affero General Public License Version 3, you should have received a
|
||||||
copy of the license file as AGPL-3.
|
copy of the license file as AGPL-3.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Files inside docs directory are copyright © 2021 Pleroma Authors
|
Files inside docs directory are copyright © 2022 Pleroma Authors
|
||||||
<https://pleroma.social/>, and are distributed under the Creative Commons
|
<https://pleroma.social/>, and are distributed under the Creative Commons
|
||||||
Attribution 4.0 International license, you should have received
|
Attribution 4.0 International license, you should have received
|
||||||
a copy of the license file as CC-BY-4.0.
|
a copy of the license file as CC-BY-4.0.
|
||||||
|
@ -30,7 +30,7 @@ priv/static/images/pleroma-fox-tan-shy.png
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
The following files are copyright © 2017-2020 Pleroma Authors
|
The following files are copyright © 2017-2022 Pleroma Authors
|
||||||
<https://pleroma.social/>, and are distributed under the Creative Commons
|
<https://pleroma.social/>, and are distributed under the Creative Commons
|
||||||
Attribution-ShareAlike 4.0 International license, you should have received
|
Attribution-ShareAlike 4.0 International license, you should have received
|
||||||
a copy of the license file as CC-BY-SA-4.0.
|
a copy of the license file as CC-BY-SA-4.0.
|
||||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -1,18 +1,22 @@
|
||||||
FROM elixir:1.9-alpine as build
|
ARG ELIXIR_VER=1.11.4
|
||||||
|
ARG ERLANG_VER=24.2.1
|
||||||
|
ARG ALPINE_VER=3.17.0
|
||||||
|
|
||||||
|
FROM hexpm/elixir:${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER} as build
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENV MIX_ENV=prod
|
ENV MIX_ENV=prod
|
||||||
|
|
||||||
RUN apk add git gcc g++ musl-dev make cmake file-dev &&\
|
RUN apk add git gcc g++ musl-dev make cmake file-dev &&\
|
||||||
echo "import Mix.Config" > config/prod.secret.exs &&\
|
echo "import Config" > config/prod.secret.exs &&\
|
||||||
mix local.hex --force &&\
|
mix local.hex --force &&\
|
||||||
mix local.rebar --force &&\
|
mix local.rebar --force &&\
|
||||||
mix deps.get --only prod &&\
|
mix deps.get --only prod &&\
|
||||||
mkdir release &&\
|
mkdir release &&\
|
||||||
mix release --path release
|
mix release --path release
|
||||||
|
|
||||||
FROM alpine:3.14
|
FROM alpine:${ALPINE_VER}
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VCS_REF
|
ARG VCS_REF
|
||||||
|
|
|
@ -30,7 +30,7 @@ If your platform is not supported, or you just want to be able to edit the sourc
|
||||||
- [OpenBSD (fi)](https://docs-develop.pleroma.social/backend/installation/openbsd_fi/)
|
- [OpenBSD (fi)](https://docs-develop.pleroma.social/backend/installation/openbsd_fi/)
|
||||||
|
|
||||||
### OS/Distro packages
|
### OS/Distro packages
|
||||||
Currently Pleroma is packaged for [YunoHost](https://yunohost.org). If you want to package Pleroma for any OS/Distros, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**.
|
Currently Pleroma is packaged for [YunoHost](https://yunohost.org) and [NixOS](https://nixos.org). If you want to package Pleroma for any OS/Distros, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**.
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
While we don’t provide docker files, other people have written very good ones. Take a look at <https://github.com/angristan/docker-pleroma> or <https://glitch.sh/sn0w/pleroma-docker>.
|
While we don’t provide docker files, other people have written very good ones. Take a look at <https://github.com/angristan/docker-pleroma> or <https://glitch.sh/sn0w/pleroma-docker>.
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
FROM elixir:1.9.4
|
FROM elixir:1.11.4
|
||||||
|
|
||||||
|
# Single RUN statement, otherwise intermediate images are created
|
||||||
|
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
|
||||||
RUN apt-get update &&\
|
RUN apt-get update &&\
|
||||||
apt-get install -y libmagic-dev cmake libimage-exiftool-perl ffmpeg &&\
|
apt-get install -y libmagic-dev cmake libimage-exiftool-perl ffmpeg &&\
|
||||||
mix local.hex --force &&\
|
mix local.hex --force &&\
|
||||||
mix local.rebar --force
|
mix local.rebar --force
|
||||||
|
|
||||||
|
|
12
ci/README
Normal file
12
ci/README
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
Assuming an AMD64 Alpine system, you're going to need the following packages
|
||||||
|
- `qemu qemu-openrc qemu-arm qemu-aarch64` for binfmt
|
||||||
|
- `docker-cli-buildx` for building the images
|
||||||
|
|
||||||
|
## Setting up
|
||||||
|
|
||||||
|
```
|
||||||
|
docker login git.pleroma.social:5050
|
||||||
|
doas rc-service qemu-binfmt start
|
||||||
|
```
|
|
@ -40,6 +40,7 @@ config :pleroma, Pleroma.Repo,
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
database: "pleroma_benchmark",
|
database: "pleroma_benchmark",
|
||||||
hostname: System.get_env("DB_HOST") || "localhost",
|
hostname: System.get_env("DB_HOST") || "localhost",
|
||||||
|
port: System.get_env("DB_PORT") || "5432",
|
||||||
pool_size: 10
|
pool_size: 10
|
||||||
|
|
||||||
# Reduce hash rounds for testing
|
# Reduce hash rounds for testing
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
# FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
|
# FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
|
||||||
#
|
#
|
||||||
# This file is responsible for configuring your application
|
# This file is responsible for configuring your application
|
||||||
# and its dependencies with the aid of the Mix.Config module.
|
# and its dependencies with the aid of the Config module.
|
||||||
#
|
#
|
||||||
# This configuration file is loaded before any dependency and
|
# This configuration file is loaded before any dependency and
|
||||||
# is restricted to this project.
|
# is restricted to this project.
|
||||||
|
@ -149,8 +149,6 @@ config :pleroma, Pleroma.Web.Endpoint,
|
||||||
]
|
]
|
||||||
|
|
||||||
# Configures Elixir's Logger
|
# Configures Elixir's Logger
|
||||||
config :logger, truncate: 65536
|
|
||||||
|
|
||||||
config :logger, :console,
|
config :logger, :console,
|
||||||
level: :debug,
|
level: :debug,
|
||||||
format: "\n$time $metadata[$level] $message\n",
|
format: "\n$time $metadata[$level] $message\n",
|
||||||
|
@ -162,11 +160,6 @@ config :logger, :ex_syslogger,
|
||||||
format: "$metadata[$level] $message",
|
format: "$metadata[$level] $message",
|
||||||
metadata: [:request_id]
|
metadata: [:request_id]
|
||||||
|
|
||||||
config :quack,
|
|
||||||
level: :warn,
|
|
||||||
meta: [:all],
|
|
||||||
webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
|
|
||||||
|
|
||||||
config :mime, :types, %{
|
config :mime, :types, %{
|
||||||
"application/xml" => ["xml"],
|
"application/xml" => ["xml"],
|
||||||
"application/xrd+xml" => ["xrd+xml"],
|
"application/xrd+xml" => ["xrd+xml"],
|
||||||
|
@ -189,6 +182,7 @@ config :pleroma, :instance,
|
||||||
email: "example@example.com",
|
email: "example@example.com",
|
||||||
notify_email: "noreply@example.com",
|
notify_email: "noreply@example.com",
|
||||||
description: "Pleroma: An efficient and flexible fediverse server",
|
description: "Pleroma: An efficient and flexible fediverse server",
|
||||||
|
short_description: "",
|
||||||
background_image: "/images/city.jpg",
|
background_image: "/images/city.jpg",
|
||||||
instance_thumbnail: "/instance/thumbnail.jpeg",
|
instance_thumbnail: "/instance/thumbnail.jpeg",
|
||||||
limit: 5_000,
|
limit: 5_000,
|
||||||
|
@ -229,6 +223,7 @@ config :pleroma, :instance,
|
||||||
max_pinned_statuses: 1,
|
max_pinned_statuses: 1,
|
||||||
attachment_links: false,
|
attachment_links: false,
|
||||||
max_report_comment_size: 1000,
|
max_report_comment_size: 1000,
|
||||||
|
report_strip_status: true,
|
||||||
safe_dm_mentions: false,
|
safe_dm_mentions: false,
|
||||||
healthcheck: false,
|
healthcheck: false,
|
||||||
remote_post_retention_days: 90,
|
remote_post_retention_days: 90,
|
||||||
|
@ -258,7 +253,27 @@ config :pleroma, :instance,
|
||||||
show_reactions: true,
|
show_reactions: true,
|
||||||
password_reset_token_validity: 60 * 60 * 24,
|
password_reset_token_validity: 60 * 60 * 24,
|
||||||
profile_directory: true,
|
profile_directory: true,
|
||||||
privileged_staff: false
|
admin_privileges: [
|
||||||
|
:users_read,
|
||||||
|
:users_manage_invites,
|
||||||
|
:users_manage_activation_state,
|
||||||
|
:users_manage_tags,
|
||||||
|
:users_manage_credentials,
|
||||||
|
:users_delete,
|
||||||
|
:messages_read,
|
||||||
|
:messages_delete,
|
||||||
|
:instances_delete,
|
||||||
|
:reports_manage_reports,
|
||||||
|
:moderation_log_read,
|
||||||
|
:announcements_manage_announcements,
|
||||||
|
:emoji_manage_emoji,
|
||||||
|
:statistics_read
|
||||||
|
],
|
||||||
|
moderator_privileges: [:messages_delete, :reports_manage_reports],
|
||||||
|
max_endorsed_users: 20,
|
||||||
|
birthday_required: false,
|
||||||
|
birthday_min_age: 0,
|
||||||
|
max_media_attachments: 1_000
|
||||||
|
|
||||||
config :pleroma, :welcome,
|
config :pleroma, :welcome,
|
||||||
direct_message: [
|
direct_message: [
|
||||||
|
@ -556,8 +571,8 @@ config :pleroma, Oban,
|
||||||
token_expiration: 5,
|
token_expiration: 5,
|
||||||
filter_expiration: 1,
|
filter_expiration: 1,
|
||||||
backup: 1,
|
backup: 1,
|
||||||
federator_incoming: 50,
|
federator_incoming: 5,
|
||||||
federator_outgoing: 50,
|
federator_outgoing: 5,
|
||||||
ingestion_queue: 50,
|
ingestion_queue: 50,
|
||||||
web_push: 50,
|
web_push: 50,
|
||||||
mailer: 10,
|
mailer: 10,
|
||||||
|
@ -670,6 +685,8 @@ config :pleroma, :features, improved_hashtag_timeline: :auto
|
||||||
|
|
||||||
config :pleroma, :populate_hashtags_table, fault_rate_allowance: 0.01
|
config :pleroma, :populate_hashtags_table, fault_rate_allowance: 0.01
|
||||||
|
|
||||||
|
config :pleroma, :delete_context_objects, fault_rate_allowance: 0.01
|
||||||
|
|
||||||
config :pleroma, :env, Mix.env()
|
config :pleroma, :env, Mix.env()
|
||||||
|
|
||||||
config :http_signatures,
|
config :http_signatures,
|
||||||
|
@ -738,7 +755,7 @@ config :pleroma, :frontends,
|
||||||
"name" => "fedi-fe",
|
"name" => "fedi-fe",
|
||||||
"git" => "https://git.pleroma.social/pleroma/fedi-fe",
|
"git" => "https://git.pleroma.social/pleroma/fedi-fe",
|
||||||
"build_url" =>
|
"build_url" =>
|
||||||
"https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
|
"https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build_release",
|
||||||
"ref" => "master",
|
"ref" => "master",
|
||||||
"custom-http-headers" => [
|
"custom-http-headers" => [
|
||||||
{"service-worker-allowed", "/"}
|
{"service-worker-allowed", "/"}
|
||||||
|
@ -751,13 +768,21 @@ config :pleroma, :frontends,
|
||||||
"https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
|
"https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
|
||||||
"ref" => "develop"
|
"ref" => "develop"
|
||||||
},
|
},
|
||||||
"soapbox-fe" => %{
|
"soapbox" => %{
|
||||||
"name" => "soapbox-fe",
|
"name" => "soapbox",
|
||||||
"git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
|
"git" => "https://gitlab.com/soapbox-pub/soapbox",
|
||||||
"build_url" =>
|
"build_url" =>
|
||||||
"https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
|
"https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production",
|
||||||
"ref" => "v1.0.0",
|
"ref" => "v3.0.0-beta.1",
|
||||||
"build_dir" => "static"
|
"build_dir" => "static"
|
||||||
|
},
|
||||||
|
"glitch-lily" => %{
|
||||||
|
"name" => "glitch-lily",
|
||||||
|
"git" => "https://lily-is.land/infra/glitch-lily",
|
||||||
|
"build_url" =>
|
||||||
|
"https://lily-is.land/infra/glitch-lily/-/jobs/artifacts/${ref}/download?job=build",
|
||||||
|
"ref" => "servant",
|
||||||
|
"build_dir" => "public"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -856,12 +881,7 @@ config :pleroma, ConcurrentLimiter, [
|
||||||
{Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
|
{Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
|
||||||
]
|
]
|
||||||
|
|
||||||
config :pleroma, :telemetry,
|
config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
|
||||||
slow_queries_logging: [
|
|
||||||
enabled: false,
|
|
||||||
min_duration: 500_000,
|
|
||||||
exclude_sources: [nil, "oban_jobs"]
|
|
||||||
]
|
|
||||||
|
|
||||||
# Import environment specific config. This must remain at the bottom
|
# Import environment specific config. This must remain at the bottom
|
||||||
# of this file so it overrides the configuration defined above.
|
# of this file so it overrides the configuration defined above.
|
||||||
|
|
|
@ -495,6 +495,27 @@ config :pleroma, :config_description, [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
%{
|
||||||
|
group: :pleroma,
|
||||||
|
key: :delete_context_objects,
|
||||||
|
type: :group,
|
||||||
|
description: "`delete_context_objects` background migration settings",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :fault_rate_allowance,
|
||||||
|
type: :float,
|
||||||
|
description:
|
||||||
|
"Max accepted rate of objects that failed in the migration. Any value from 0.0 which tolerates no errors to 1.0 which will enable the feature even if context object deletion failed for all records.",
|
||||||
|
suggestions: [0.01]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :sleep_interval_ms,
|
||||||
|
type: :integer,
|
||||||
|
description:
|
||||||
|
"Sleep interval between each chunk of processed records in order to decrease the load on the system (defaults to 0 and should be keep default on most instances)."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
group: :pleroma,
|
group: :pleroma,
|
||||||
key: :instance,
|
key: :instance,
|
||||||
|
@ -536,6 +557,15 @@ config :pleroma, :config_description, [
|
||||||
"Very cool instance"
|
"Very cool instance"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
%{
|
||||||
|
key: :short_description,
|
||||||
|
type: :string,
|
||||||
|
description:
|
||||||
|
"Shorter version of instance description. It can be seen on `/api/v1/instance`",
|
||||||
|
suggestions: [
|
||||||
|
"Cool instance"
|
||||||
|
]
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
key: :limit,
|
key: :limit,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
|
@ -552,6 +582,14 @@ config :pleroma, :config_description, [
|
||||||
100_000
|
100_000
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
%{
|
||||||
|
key: :max_media_attachments,
|
||||||
|
type: :integer,
|
||||||
|
description: "Maximum number of post media attachments",
|
||||||
|
suggestions: [
|
||||||
|
1_000_000
|
||||||
|
]
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
key: :upload_limit,
|
key: :upload_limit,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
|
@ -742,6 +780,16 @@ config :pleroma, :config_description, [
|
||||||
3
|
3
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
%{
|
||||||
|
key: :max_endorsed_users,
|
||||||
|
type: :integer,
|
||||||
|
description: "The maximum number of recommended accounts. 0 will disable the feature.",
|
||||||
|
suggestions: [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
key: :autofollowed_nicknames,
|
key: :autofollowed_nicknames,
|
||||||
type: {:list, :string},
|
type: {:list, :string},
|
||||||
|
@ -767,6 +815,13 @@ config :pleroma, :config_description, [
|
||||||
1_000
|
1_000
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
%{
|
||||||
|
key: :report_strip_status,
|
||||||
|
label: "Report strip status",
|
||||||
|
type: :boolean,
|
||||||
|
description:
|
||||||
|
"Strip associated statuses in reports to ids when closed/resolved, otherwise keep a copy"
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
key: :safe_dm_mentions,
|
key: :safe_dm_mentions,
|
||||||
label: "Safe DM mentions",
|
label: "Safe DM mentions",
|
||||||
|
@ -943,10 +998,69 @@ config :pleroma, :config_description, [
|
||||||
description: "Enable profile directory."
|
description: "Enable profile directory."
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
key: :privileged_staff,
|
key: :admin_privileges,
|
||||||
type: :boolean,
|
type: {:list, :atom},
|
||||||
|
suggestions: [
|
||||||
|
:users_read,
|
||||||
|
:users_manage_invites,
|
||||||
|
:users_manage_activation_state,
|
||||||
|
:users_manage_tags,
|
||||||
|
:users_manage_credentials,
|
||||||
|
:users_delete,
|
||||||
|
:messages_read,
|
||||||
|
:messages_delete,
|
||||||
|
:instances_delete,
|
||||||
|
:reports_manage_reports,
|
||||||
|
:moderation_log_read,
|
||||||
|
:announcements_manage_announcements,
|
||||||
|
:emoji_manage_emoji,
|
||||||
|
:statistics_read
|
||||||
|
],
|
||||||
description:
|
description:
|
||||||
"Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
|
"What extra privileges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :moderator_privileges,
|
||||||
|
type: {:list, :atom},
|
||||||
|
suggestions: [
|
||||||
|
:users_read,
|
||||||
|
:users_manage_invites,
|
||||||
|
:users_manage_activation_state,
|
||||||
|
:users_manage_tags,
|
||||||
|
:users_manage_credentials,
|
||||||
|
:users_delete,
|
||||||
|
:messages_read,
|
||||||
|
:messages_delete,
|
||||||
|
:instances_delete,
|
||||||
|
:reports_manage_reports,
|
||||||
|
:moderation_log_read,
|
||||||
|
:announcements_manage_announcements,
|
||||||
|
:emoji_manage_emoji,
|
||||||
|
:statistics_read
|
||||||
|
],
|
||||||
|
description:
|
||||||
|
"What extra privileges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :birthday_required,
|
||||||
|
type: :boolean,
|
||||||
|
description: "Require users to enter their birthday."
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :birthday_min_age,
|
||||||
|
type: :integer,
|
||||||
|
description:
|
||||||
|
"Minimum required age (in days) for users to create account. Only used if birthday is required.",
|
||||||
|
suggestions: [6570]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :languages,
|
||||||
|
type: {:list, :string},
|
||||||
|
description:
|
||||||
|
"Languages to be exposed in /api/v1/instance. Should be in the format of BCP47 language codes.",
|
||||||
|
suggestions: [
|
||||||
|
"en"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1130,45 +1244,6 @@ config :pleroma, :config_description, [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
group: :quack,
|
|
||||||
type: :group,
|
|
||||||
label: "Quack Logger",
|
|
||||||
description: "Quack-related settings",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :level,
|
|
||||||
type: {:dropdown, :atom},
|
|
||||||
description: "Log level",
|
|
||||||
suggestions: [:debug, :info, :warn, :error]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :meta,
|
|
||||||
type: {:list, :atom},
|
|
||||||
description: "Configure which metadata you want to report on",
|
|
||||||
suggestions: [
|
|
||||||
:application,
|
|
||||||
:module,
|
|
||||||
:file,
|
|
||||||
:function,
|
|
||||||
:line,
|
|
||||||
:pid,
|
|
||||||
:crash_reason,
|
|
||||||
:initial_call,
|
|
||||||
:registered_name,
|
|
||||||
:all,
|
|
||||||
:none
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :webhook_url,
|
|
||||||
label: "Webhook URL",
|
|
||||||
type: :string,
|
|
||||||
description: "Configure the Slack incoming webhook",
|
|
||||||
suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
group: :pleroma,
|
group: :pleroma,
|
||||||
key: :frontend_configurations,
|
key: :frontend_configurations,
|
||||||
|
@ -1691,6 +1766,11 @@ config :pleroma, :config_description, [
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
description: "Sign object fetches with HTTP signatures"
|
description: "Sign object fetches with HTTP signatures"
|
||||||
},
|
},
|
||||||
|
%{
|
||||||
|
key: :authorized_fetch_mode,
|
||||||
|
type: :boolean,
|
||||||
|
description: "Require HTTP signatures for AP fetches"
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
key: :note_replies_output_limit,
|
key: :note_replies_output_limit,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
|
@ -2697,7 +2777,7 @@ config :pleroma, :config_description, [
|
||||||
key: :versions,
|
key: :versions,
|
||||||
type: {:list, :atom},
|
type: {:list, :atom},
|
||||||
description: "List of TLS version to use",
|
description: "List of TLS version to use",
|
||||||
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
|
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2", ":tlsv1.3"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ config :pleroma, Pleroma.Repo,
|
||||||
password: System.fetch_env!("DB_PASS"),
|
password: System.fetch_env!("DB_PASS"),
|
||||||
database: System.get_env("DB_NAME", "pleroma"),
|
database: System.get_env("DB_NAME", "pleroma"),
|
||||||
hostname: System.get_env("DB_HOST", "db"),
|
hostname: System.get_env("DB_HOST", "db"),
|
||||||
|
port: System.get_env("DB_PORT", "5432"),
|
||||||
pool_size: 10
|
pool_size: 10
|
||||||
|
|
||||||
# Configure web push notifications
|
# Configure web push notifications
|
||||||
|
|
|
@ -47,6 +47,7 @@ config :pleroma, Pleroma.Repo,
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
database: "pleroma_test",
|
database: "pleroma_test",
|
||||||
hostname: System.get_env("DB_HOST") || "localhost",
|
hostname: System.get_env("DB_HOST") || "localhost",
|
||||||
|
port: System.get_env("DB_PORT") || "5432",
|
||||||
pool: Ecto.Adapters.SQL.Sandbox,
|
pool: Ecto.Adapters.SQL.Sandbox,
|
||||||
pool_size: 50
|
pool_size: 50
|
||||||
|
|
||||||
|
@ -81,10 +82,7 @@ config :web_push_encryption, :vapid_details,
|
||||||
"BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
|
"BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
|
||||||
private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
|
private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
|
||||||
|
|
||||||
config :pleroma, Oban,
|
config :pleroma, Oban, testing: :manual
|
||||||
queues: false,
|
|
||||||
crontab: false,
|
|
||||||
plugins: false
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.ScheduledActivity,
|
config :pleroma, Pleroma.ScheduledActivity,
|
||||||
daily_user_limit: 2,
|
daily_user_limit: 2,
|
||||||
|
@ -129,6 +127,8 @@ config :pleroma, :pipeline,
|
||||||
|
|
||||||
config :pleroma, :cachex, provider: Pleroma.CachexMock
|
config :pleroma, :cachex, provider: Pleroma.CachexMock
|
||||||
|
|
||||||
|
config :pleroma, Pleroma.Web.WebFinger, update_nickname_on_user_fetch: false
|
||||||
|
|
||||||
config :pleroma, :side_effects,
|
config :pleroma, :side_effects,
|
||||||
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
|
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
|
||||||
logger: Pleroma.LoggerMock
|
logger: Pleroma.LoggerMock
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "-- Waiting for database..."
|
echo "-- Waiting for database..."
|
||||||
while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:5432/${DB_NAME:-pleroma} -t 1; do
|
while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-pleroma} -t 1; do
|
||||||
sleep 1s
|
sleep 1s
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Currently, known `<frontend>` values are:
|
||||||
- [kenoma](http://git.pleroma.social/lambadalambda/kenoma)
|
- [kenoma](http://git.pleroma.social/lambadalambda/kenoma)
|
||||||
- [pleroma-fe](http://git.pleroma.social/pleroma/pleroma-fe)
|
- [pleroma-fe](http://git.pleroma.social/pleroma/pleroma-fe)
|
||||||
- [fedi-fe](https://git.pleroma.social/pleroma/fedi-fe)
|
- [fedi-fe](https://git.pleroma.social/pleroma/fedi-fe)
|
||||||
- [soapbox-fe](https://gitlab.com/soapbox-pub/soapbox-fe)
|
- [soapbox](https://gitlab.com/soapbox-pub/soapbox)
|
||||||
|
|
||||||
You can still install frontends that are not configured, see below.
|
You can still install frontends that are not configured, see below.
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,8 @@ If any of the options are left unspecified, you will be prompted interactively.
|
||||||
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
||||||
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
|
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
|
||||||
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
|
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
|
||||||
- `--strip-uploads <Y|N>` - use ExifTool to strip uploads of sensitive location data
|
- `--strip-uploads-location <Y|N>` - use ExifTool to strip uploads of sensitive location data
|
||||||
|
- `--read-uploads-description <Y|N>` - use ExifTool to read image descriptions from uploads
|
||||||
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
|
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
|
||||||
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
|
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
|
||||||
- `--skip-release-env` - skip generation the release environment file
|
- `--skip-release-env` - skip generation the release environment file
|
||||||
|
|
|
@ -17,11 +17,11 @@ su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
||||||
## For from source installations (using git)
|
## For from source installations (using git)
|
||||||
|
|
||||||
1. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
1. Go to the working directory of Pleroma (default is `/opt/pleroma`)
|
||||||
2. Run `git pull`. This pulls the latest changes from upstream.
|
2. Run `git checkout <tagged release>` [^1]. e.g. `git checkout v2.4.5` This pulls the [tagged release](https://git.pleroma.social/pleroma/pleroma/-/releases) from upstream.
|
||||||
3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
|
3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
|
||||||
4. Stop the Pleroma service.
|
4. Stop the Pleroma service.
|
||||||
5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
|
5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
|
||||||
6. Start the Pleroma service.
|
6. Start the Pleroma service.
|
||||||
|
|
||||||
[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `mix` tasks as `pleroma` user by adding `sudo -Hu pleroma` before the command.
|
[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `git` and `mix` tasks as `pleroma` user by adding `sudo -Hu pleroma` before the command.
|
||||||
[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
||||||
|
|
|
@ -116,3 +116,9 @@ Feel free to contact us to be added to this list!
|
||||||
- Contact: [@r@freesoftwareextremist.com](https://freesoftwareextremist.com/users/r)
|
- Contact: [@r@freesoftwareextremist.com](https://freesoftwareextremist.com/users/r)
|
||||||
- Features: Does not requires JavaScript
|
- Features: Does not requires JavaScript
|
||||||
- Features: MastoAPI
|
- Features: MastoAPI
|
||||||
|
|
||||||
|
### Glitch-lily
|
||||||
|
- Source Code: <https://lily.kazv.moe/infra/glitch-lily>
|
||||||
|
- Contact: [@tusooa@kazv.moe](https://kazv.moe/users/tusooa)
|
||||||
|
- Features: MastoAPI
|
||||||
|
- Based on [glitch-soc](https://github.com/glitch-soc/mastodon) frontend
|
||||||
|
|
|
@ -18,6 +18,7 @@ To add configuration to your config file, you can copy it from the base config.
|
||||||
* `email`: Email used to reach an Administrator/Moderator of the instance.
|
* `email`: Email used to reach an Administrator/Moderator of the instance.
|
||||||
* `notify_email`: Email used for notifications.
|
* `notify_email`: Email used for notifications.
|
||||||
* `description`: The instance’s description, can be seen in nodeinfo and ``/api/v1/instance``.
|
* `description`: The instance’s description, can be seen in nodeinfo and ``/api/v1/instance``.
|
||||||
|
* `short_description`: Shorter version of instance description, can be seen on ``/api/v1/instance``.
|
||||||
* `limit`: Posts character limit (CW/Subject included in the counter).
|
* `limit`: Posts character limit (CW/Subject included in the counter).
|
||||||
* `description_limit`: The character limit for image descriptions.
|
* `description_limit`: The character limit for image descriptions.
|
||||||
* `remote_limit`: Hard character limit beyond which remote posts will be dropped.
|
* `remote_limit`: Hard character limit beyond which remote posts will be dropped.
|
||||||
|
@ -48,6 +49,7 @@ To add configuration to your config file, you can copy it from the base config.
|
||||||
* `autofollowing_nicknames`: Set to nicknames of (local) users that automatically follows every newly registered user.
|
* `autofollowing_nicknames`: Set to nicknames of (local) users that automatically follows every newly registered user.
|
||||||
* `attachment_links`: Set to true to enable automatically adding attachment link text to statuses.
|
* `attachment_links`: Set to true to enable automatically adding attachment link text to statuses.
|
||||||
* `max_report_comment_size`: The maximum size of the report comment (Default: `1000`).
|
* `max_report_comment_size`: The maximum size of the report comment (Default: `1000`).
|
||||||
|
* `report_strip_status`: Strip associated statuses in reports to ids when closed/resolved, otherwise keep a copy.
|
||||||
* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`.
|
* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`.
|
||||||
* `healthcheck`: If set to true, system data will be shown on ``/api/v1/pleroma/healthcheck``.
|
* `healthcheck`: If set to true, system data will be shown on ``/api/v1/pleroma/healthcheck``.
|
||||||
* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database.
|
* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database.
|
||||||
|
@ -64,6 +66,36 @@ To add configuration to your config file, you can copy it from the base config.
|
||||||
* `cleanup_attachments`: Remove attachments along with statuses. Does not affect duplicate files and attachments without status. Enabling this will increase load to database when deleting statuses on larger instances.
|
* `cleanup_attachments`: Remove attachments along with statuses. Does not affect duplicate files and attachments without status. Enabling this will increase load to database when deleting statuses on larger instances.
|
||||||
* `show_reactions`: Let favourites and emoji reactions be viewed through the API (default: `true`).
|
* `show_reactions`: Let favourites and emoji reactions be viewed through the API (default: `true`).
|
||||||
* `password_reset_token_validity`: The time after which reset tokens aren't accepted anymore, in seconds (default: one day).
|
* `password_reset_token_validity`: The time after which reset tokens aren't accepted anymore, in seconds (default: one day).
|
||||||
|
* `admin_privileges`: A list of privileges an admin has (e.g. delete messages, manage reports...)
|
||||||
|
* Possible values are:
|
||||||
|
* `:users_read`
|
||||||
|
* Allows admins to fetch users through the admin API.
|
||||||
|
* `:users_manage_invites`
|
||||||
|
* Allows admins to manage invites. This includes sending, resending, revoking and approving invites.
|
||||||
|
* `:users_manage_activation_state`
|
||||||
|
* Allows admins to activate and deactivate accounts. This also allows them to see deactivated users through the Mastodon API.
|
||||||
|
* `:users_manage_tags`
|
||||||
|
* Allows admins to set and remove tags for users. This can be useful in combination with MRF policies, such as `Pleroma.Web.ActivityPub.MRF.TagPolicy`.
|
||||||
|
* `:users_manage_credentials`
|
||||||
|
* Allows admins to trigger a password reset and set new credentials for an user.
|
||||||
|
* `:users_delete`
|
||||||
|
* Allows admins to delete accounts. Note that deleting an account is actually deactivating it and removing all data like posts, profile information, etc.
|
||||||
|
* `:messages_read`
|
||||||
|
* Allows admins to read messages through the admin API, including non-public posts and chats.
|
||||||
|
* `:messages_delete`
|
||||||
|
* Allows admins to delete messages from other users.
|
||||||
|
* `:instances_delete,`
|
||||||
|
* Allows admins to remove a whole remote instance from your instance. This will delete all users and messages from that remote instance.
|
||||||
|
* `:reports_manage_reports`
|
||||||
|
* Allows admins to see and manage reports.
|
||||||
|
* `:moderation_log_read,`
|
||||||
|
* Allows admins to read the entries in the moderation log.
|
||||||
|
* `:emoji_manage_emoji`
|
||||||
|
* Allows admins to manage custom emoji on the instance.
|
||||||
|
* `:statistics_read,`
|
||||||
|
* Allows admins to see some simple statistics about the instance.
|
||||||
|
* `moderator_privileges`: A list of privileges a moderator has (e.g. delete messages, manage reports...)
|
||||||
|
* Possible values are the same as for `admin_privileges`
|
||||||
|
|
||||||
## :database
|
## :database
|
||||||
* `improved_hashtag_timeline`: Setting to force toggle / force disable improved hashtags timeline. `:enabled` forces hashtags to be fetched from `hashtags` table for hashtags timeline. `:disabled` forces object-embedded hashtags to be used (slower). Keep it `:auto` for automatic behaviour (it is auto-set to `:enabled` [unless overridden] when HashtagsTableMigrator completes).
|
* `improved_hashtag_timeline`: Setting to force toggle / force disable improved hashtags timeline. `:enabled` forces hashtags to be fetched from `hashtags` table for hashtags timeline. `:disabled` forces object-embedded hashtags to be used (slower). Keep it `:auto` for automatic behaviour (it is auto-set to `:enabled` [unless overridden] when HashtagsTableMigrator completes).
|
||||||
|
@ -125,6 +157,9 @@ To add configuration to your config file, you can copy it from the base config.
|
||||||
* `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.Workers.PurgeExpiredActivity` to be enabled for processing the scheduled delections.
|
* `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.Workers.PurgeExpiredActivity` to be enabled for processing the scheduled delections.
|
||||||
* `Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy`: Makes all bot posts to disappear from public timelines.
|
* `Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy`: Makes all bot posts to disappear from public timelines.
|
||||||
* `Pleroma.Web.ActivityPub.MRF.FollowBotPolicy`: Automatically follows newly discovered users from the specified bot account. Local accounts, locked accounts, and users with "#nobot" in their bio are respected and excluded from being followed.
|
* `Pleroma.Web.ActivityPub.MRF.FollowBotPolicy`: Automatically follows newly discovered users from the specified bot account. Local accounts, locked accounts, and users with "#nobot" in their bio are respected and excluded from being followed.
|
||||||
|
* `Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy`: Drops follow requests from followbots. Users can still allow bots to follow them by first following the bot.
|
||||||
|
* `Pleroma.Web.ActivityPub.MRF.KeywordPolicy`: Rejects or removes from the federated timeline or replaces keywords. (See [`:mrf_keyword`](#mrf_keyword)).
|
||||||
|
* `Pleroma.Web.ActivityPub.MRF.ForceMentionsInContent`: Forces every mentioned user to be reflected in the post content.
|
||||||
* `transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo).
|
* `transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo).
|
||||||
* `transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.
|
* `transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.
|
||||||
|
|
||||||
|
@ -200,7 +235,7 @@ config :pleroma, :mrf_user_allowlist, %{
|
||||||
e.g., A value of 900 results in any post with a timestamp older than 15 minutes will be acted upon.
|
e.g., A value of 900 results in any post with a timestamp older than 15 minutes will be acted upon.
|
||||||
* `actions`: A list of actions to apply to the post:
|
* `actions`: A list of actions to apply to the post:
|
||||||
* `:delist` removes the post from public timelines
|
* `:delist` removes the post from public timelines
|
||||||
* `:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines
|
* `:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines, additionally for followers-only it degrades to a direct message
|
||||||
* `:reject` rejects the message entirely
|
* `:reject` rejects the message entirely
|
||||||
|
|
||||||
#### :mrf_steal_emoji
|
#### :mrf_steal_emoji
|
||||||
|
@ -624,12 +659,18 @@ This filter replaces the filename (not the path) of an upload. For complete obfu
|
||||||
|
|
||||||
No specific configuration.
|
No specific configuration.
|
||||||
|
|
||||||
#### Pleroma.Upload.Filter.Exiftool
|
#### Pleroma.Upload.Filter.Exiftool.StripLocation
|
||||||
|
|
||||||
This filter only strips the GPS and location metadata with Exiftool leaving color profiles and attributes intact.
|
This filter only strips the GPS and location metadata with Exiftool leaving color profiles and attributes intact.
|
||||||
|
|
||||||
No specific configuration.
|
No specific configuration.
|
||||||
|
|
||||||
|
#### Pleroma.Upload.Filter.Exiftool.ReadDescription
|
||||||
|
|
||||||
|
This filter reads the ImageDescription and iptc:Caption-Abstract fields with Exiftool so clients can prefill the media description field.
|
||||||
|
|
||||||
|
No specific configuration.
|
||||||
|
|
||||||
#### Pleroma.Upload.Filter.Mogrify
|
#### Pleroma.Upload.Filter.Mogrify
|
||||||
|
|
||||||
* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`.
|
* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`.
|
||||||
|
@ -767,7 +808,7 @@ Web Push Notifications configuration. You can use the mix task `mix web_push.gen
|
||||||
* ``private_key``: VAPID private key
|
* ``private_key``: VAPID private key
|
||||||
|
|
||||||
## :logger
|
## :logger
|
||||||
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog, and `Quack.Logger` to log to Slack
|
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog
|
||||||
|
|
||||||
An example to enable ONLY ExSyslogger (f/ex in ``prod.secret.exs``) with info and debug suppressed:
|
An example to enable ONLY ExSyslogger (f/ex in ``prod.secret.exs``) with info and debug suppressed:
|
||||||
```elixir
|
```elixir
|
||||||
|
@ -790,10 +831,10 @@ config :logger, :ex_syslogger,
|
||||||
|
|
||||||
See: [logger’s documentation](https://hexdocs.pm/logger/Logger.html) and [ex_syslogger’s documentation](https://hexdocs.pm/ex_syslogger/)
|
See: [logger’s documentation](https://hexdocs.pm/logger/Logger.html) and [ex_syslogger’s documentation](https://hexdocs.pm/ex_syslogger/)
|
||||||
|
|
||||||
An example of logging info to local syslog, but warn to a Slack channel:
|
An example of logging info to local syslog, but debug to console:
|
||||||
```elixir
|
```elixir
|
||||||
config :logger,
|
config :logger,
|
||||||
backends: [ {ExSyslogger, :ex_syslogger}, Quack.Logger ],
|
backends: [ {ExSyslogger, :ex_syslogger}, :console ],
|
||||||
level: :info
|
level: :info
|
||||||
|
|
||||||
config :logger, :ex_syslogger,
|
config :logger, :ex_syslogger,
|
||||||
|
@ -801,14 +842,12 @@ config :logger, :ex_syslogger,
|
||||||
ident: "pleroma",
|
ident: "pleroma",
|
||||||
format: "$metadata[$level] $message"
|
format: "$metadata[$level] $message"
|
||||||
|
|
||||||
config :quack,
|
config :logger, :console,
|
||||||
level: :warn,
|
level: :debug,
|
||||||
meta: [:all],
|
format: "\n$time $metadata[$level] $message\n",
|
||||||
webhook_url: "https://hooks.slack.com/services/YOUR-API-KEY-HERE"
|
metadata: [:request_id]
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [Quack Github](https://github.com/azohra/quack) for more details
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Database options
|
## Database options
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
# How to use a different domain name for Pleroma and the users it serves
|
||||||
|
|
||||||
|
Pleroma users are primarily identified by a `user@example.org` handle, and you might want this identifier to be the same as your email or jabber account, for instance.
|
||||||
|
However, in this case, you are almost certainly serving some web content on `https://example.org` already, and you might want to use another domain (say `pleroma.example.org`) for Pleroma itself.
|
||||||
|
|
||||||
|
Pleroma supports that, but it might be tricky to set up, and any error might prevent you from federating with other instances.
|
||||||
|
|
||||||
|
*If you are already running Pleroma on `example.org`, it is no longer possible to move it to `pleroma.example.org`.*
|
||||||
|
|
||||||
|
## Account identifiers
|
||||||
|
|
||||||
|
It is important to understand that for federation purposes, a user in Pleroma has two unique identifiers associated:
|
||||||
|
|
||||||
|
- A webfinger `acct:` URI, used for discovery and as a verifiable global name for the user across Pleroma instances. In our example, our account's acct: URI is `acct:user@example.org`
|
||||||
|
- An author/actor URI, used in every other aspect of federation. This is the way in which users are identified in ActivityPub, the underlying protocol used for federation with other Pleroma instances.
|
||||||
|
In our case, it is `https://pleroma.example.org/users/user`.
|
||||||
|
|
||||||
|
Both account identifiers are unique and required for Pleroma. An important risk if you set up your Pleroma instance incorrectly is to create two users (with different acct: URIs) with conflicting author/actor URIs.
|
||||||
|
|
||||||
|
## WebFinger
|
||||||
|
|
||||||
|
As said earlier, each Pleroma user has an `acct`: URI, which is used for discovery and authentication. When you add @user@example.org, a webfinger query is performed. This is done in two steps:
|
||||||
|
|
||||||
|
1. Querying `https://example.org/.well-known/host-meta` (where the domain of the URL matches the domain part of the `acct`: URI) to get information on how to perform the query.
|
||||||
|
This file will indeed contain a URL template of the form `https://example.org/.well-known/webfinger?resource={uri}` that will be used in the second step.
|
||||||
|
2. Fill the returned template with the `acct`: URI to be queried and perform the query: `https://example.org/.well-known/webfinger?resource=acct:user@example.org`
|
||||||
|
|
||||||
|
## Configuring your Pleroma instance
|
||||||
|
|
||||||
|
**_DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE_**
|
||||||
|
|
||||||
|
### Configuring Pleroma
|
||||||
|
|
||||||
|
Pleroma has a two configuration settings to enable using different domains for your users and Pleroma itself. `host` in `Pleroma.Web.Endpoint` and `domain` in `Pleroma.Web.WebFinger`. When the latter is not set, it defaults to the value of `host`.
|
||||||
|
|
||||||
|
*Be extra careful when configuring your Pleroma instance, as changing `host` may cause remote instances to register different accounts with the same author/actor URI, which will result in federation issues!*
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
config :pleroma, Pleroma.Web.Endpoint,
|
||||||
|
url: [host: "pleroma.example.org"]
|
||||||
|
|
||||||
|
config :pleroma, Pleroma.Web.WebFinger, domain: "example.org"
|
||||||
|
```
|
||||||
|
|
||||||
|
- `domain` - is the domain for which your Pleroma instance has authority, it's the domain used in `acct:` URI. In our example, `domain` would be set to `example.org`. This is used in WebFinger account ids, which are the canonical account identifier in some other fediverse software like Mastodon. **If you change `domain`, the accounts on your server will be shown as different accounts in those software**.
|
||||||
|
- `host` - is the domain used for any URL generated for your instance, including the author/actor URL's. In our case, that would be `pleroma.example.org`. This is used in AP ids, which are the canonical account identifier in Pleroma and some other fediverse software. **You should not change this after you have set up the instance**.
|
||||||
|
|
||||||
|
### Configuring WebFinger domain
|
||||||
|
|
||||||
|
Now, you have Pleroma running at `https://pleroma.example.org` as well as a website at `https://example.org`. If you recall how webfinger queries work, the first step is to query `https://example.org/.well-known/host-meta`, which will contain an URL template.
|
||||||
|
|
||||||
|
Therefore, the easiest way to configure `example.org` is to redirect `/.well-known/host-meta` to `pleroma.example.org`.
|
||||||
|
|
||||||
|
With nginx, it would be as simple as adding:
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
location = /.well-known/host-meta {
|
||||||
|
return 301 https://pleroma.example.org$request_uri;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
in example.org's server block.
|
|
@ -59,7 +59,7 @@ The configuration of Pleroma has traditionally been managed with a config file,
|
||||||
Here is an example of a server config stripped down after migration:
|
Here is an example of a server config stripped down after migration:
|
||||||
|
|
||||||
```
|
```
|
||||||
use Mix.Config
|
import Config
|
||||||
|
|
||||||
config :pleroma, Pleroma.Web.Endpoint,
|
config :pleroma, Pleroma.Web.Endpoint,
|
||||||
url: [host: "cool.pleroma.site", scheme: "https", port: 443]
|
url: [host: "cool.pleroma.site", scheme: "https", port: 443]
|
||||||
|
|
|
@ -1064,7 +1064,6 @@ List of settings which support only full update by key:
|
||||||
```elixir
|
```elixir
|
||||||
@full_key_update [
|
@full_key_update [
|
||||||
{:pleroma, :ecto_repos},
|
{:pleroma, :ecto_repos},
|
||||||
{:quack, :meta},
|
|
||||||
{:mime, :types},
|
{:mime, :types},
|
||||||
{:cors_plug, [:max_age, :methods, :expose, :headers]},
|
{:cors_plug, [:max_age, :methods, :expose, :headers]},
|
||||||
{:auto_linker, :opts},
|
{:auto_linker, :opts},
|
||||||
|
@ -1084,18 +1083,18 @@ List of settings which support only full update by subkey:
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
*Settings without explicit key must be sended in separate config object params.*
|
*Settings without explicit key must be sent in separate config object params.*
|
||||||
```elixir
|
```elixir
|
||||||
config :quack,
|
config :foo,
|
||||||
level: :debug,
|
bar: :baz,
|
||||||
meta: [:all],
|
meta: [:data],
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"configs": [
|
"configs": [
|
||||||
{"group": ":quack", "key": ":level", "value": ":debug"},
|
{"group": ":foo", "key": ":bar", "value": ":baz"},
|
||||||
{"group": ":quack", "key": ":meta", "value": [":all"]},
|
{"group": ":foo", "key": ":meta", "value": [":data"]},
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1636,3 +1635,117 @@ Returns the content of the document
|
||||||
"error": "Could not install frontend"
|
"error": "Could not install frontend"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `GET /api/v1/pleroma/admin/announcements`
|
||||||
|
|
||||||
|
### List announcements
|
||||||
|
|
||||||
|
- Params: `offset`, `limit`
|
||||||
|
|
||||||
|
- Response: JSON, list of announcements
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "AHDp0GBdRn1EPN5HN2",
|
||||||
|
"content": "some content",
|
||||||
|
"starts_at": null,
|
||||||
|
"ends_at": null,
|
||||||
|
"all_day": false,
|
||||||
|
"published_at": "2022-03-09T02:13:05",
|
||||||
|
"reactions": [],
|
||||||
|
"statuses": [],
|
||||||
|
"tags": [],
|
||||||
|
"emojis": [],
|
||||||
|
"updated_at": "2022-03-09T02:13:05"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that this differs from the Mastodon API variant: Mastodon API only returns *active* announcements, while this returns all.
|
||||||
|
|
||||||
|
## `GET /api/v1/pleroma/admin/announcements/:id`
|
||||||
|
|
||||||
|
### Display one announcement
|
||||||
|
|
||||||
|
- Response: JSON, one announcement
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "AHDp0GBdRn1EPN5HN2",
|
||||||
|
"content": "some content",
|
||||||
|
"starts_at": null,
|
||||||
|
"ends_at": null,
|
||||||
|
"all_day": false,
|
||||||
|
"published_at": "2022-03-09T02:13:05",
|
||||||
|
"reactions": [],
|
||||||
|
"statuses": [],
|
||||||
|
"tags": [],
|
||||||
|
"emojis": [],
|
||||||
|
"updated_at": "2022-03-09T02:13:05"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## `POST /api/v1/pleroma/admin/announcements`
|
||||||
|
|
||||||
|
### Create an announcement
|
||||||
|
|
||||||
|
- Params:
|
||||||
|
- `content`: string, required, announcement content
|
||||||
|
- `starts_at`: datetime, optional, default to null, the time when the announcement will become active (displayed to users); if it is null, the announcement will be active immediately
|
||||||
|
- `ends_at`: datetime, optional, default to null, the time when the announcement will become inactive (no longer displayed to users); if it is null, the announcement will be active until an admin deletes it
|
||||||
|
- `all_day`: boolean, optional, default to false, tells the client whether to only display dates for `starts_at` and `ends_at`
|
||||||
|
|
||||||
|
- Response: JSON, created announcement
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "AHDp0GBdRn1EPN5HN2",
|
||||||
|
"content": "some content",
|
||||||
|
"starts_at": null,
|
||||||
|
"ends_at": null,
|
||||||
|
"all_day": false,
|
||||||
|
"published_at": "2022-03-09T02:13:05",
|
||||||
|
"reactions": [],
|
||||||
|
"statuses": [],
|
||||||
|
"tags": [],
|
||||||
|
"emojis": [],
|
||||||
|
"updated_at": "2022-03-09T02:13:05"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## `PATCH /api/v1/pleroma/admin/announcements/:id`
|
||||||
|
|
||||||
|
### Change an announcement
|
||||||
|
|
||||||
|
- Params: same as `POST /api/v1/pleroma/admin/announcements`, except no param is required.
|
||||||
|
|
||||||
|
- Updates the announcement according to params. Missing params are kept as-is.
|
||||||
|
|
||||||
|
- Response: JSON, updated announcement
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "AHDp0GBdRn1EPN5HN2",
|
||||||
|
"content": "some content",
|
||||||
|
"starts_at": null,
|
||||||
|
"ends_at": null,
|
||||||
|
"all_day": false,
|
||||||
|
"published_at": "2022-03-09T02:13:05",
|
||||||
|
"reactions": [],
|
||||||
|
"statuses": [],
|
||||||
|
"tags": [],
|
||||||
|
"emojis": [],
|
||||||
|
"updated_at": "2022-03-09T02:13:05"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## `DELETE /api/v1/pleroma/admin/announcements/:id`
|
||||||
|
|
||||||
|
### Delete an announcement
|
||||||
|
|
||||||
|
- Response: JSON, empty object
|
||||||
|
|
||||||
|
```json
|
||||||
|
{}
|
||||||
|
```
|
||||||
|
|
|
@ -40,6 +40,10 @@ Has these additional fields under the `pleroma` object:
|
||||||
- `parent_visible`: If the parent of this post is visible to the user or not.
|
- `parent_visible`: If the parent of this post is visible to the user or not.
|
||||||
- `pinned_at`: a datetime (iso8601) when status was pinned, `null` otherwise.
|
- `pinned_at`: a datetime (iso8601) when status was pinned, `null` otherwise.
|
||||||
|
|
||||||
|
The `GET /api/v1/statuses/:id/source` endpoint additionally has the following attributes:
|
||||||
|
|
||||||
|
- `content_type`: The content type of the status source.
|
||||||
|
|
||||||
## Scheduled statuses
|
## Scheduled statuses
|
||||||
|
|
||||||
Has these additional fields in `params`:
|
Has these additional fields in `params`:
|
||||||
|
@ -241,6 +245,7 @@ Additional parameters can be added to the JSON body/Form data:
|
||||||
- `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results).
|
- `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results).
|
||||||
- `actor_type` - the type of this account.
|
- `actor_type` - the type of this account.
|
||||||
- `accepts_chat_messages` - if false, this account will reject all chat messages.
|
- `accepts_chat_messages` - if false, this account will reject all chat messages.
|
||||||
|
- `language` - user's preferred language for receiving emails (digest, confirmation, etc.)
|
||||||
|
|
||||||
All images (avatar, banner and background) can be reset to the default by sending an empty string ("") instead of a file.
|
All images (avatar, banner and background) can be reset to the default by sending an empty string ("") instead of a file.
|
||||||
|
|
||||||
|
@ -292,6 +297,7 @@ Has these additional parameters (which are the same as in Pleroma-API):
|
||||||
- `captcha_token`: optional, contains provider-specific captcha token
|
- `captcha_token`: optional, contains provider-specific captcha token
|
||||||
- `captcha_answer_data`: optional, contains provider-specific captcha data
|
- `captcha_answer_data`: optional, contains provider-specific captcha data
|
||||||
- `token`: invite token required when the registrations aren't public.
|
- `token`: invite token required when the registrations aren't public.
|
||||||
|
- `language`: optional, user's preferred language for receiving emails (digest, confirmation, etc.), default to the language set in the `userLanguage` cookies or `Accept-Language` header.
|
||||||
|
|
||||||
## Instance
|
## Instance
|
||||||
|
|
||||||
|
@ -377,12 +383,6 @@ Pleroma is generally compatible with the Mastodon 2.7.2 API, but some newer feat
|
||||||
|
|
||||||
- `GET /api/v1/identity_proofs`: Returns an empty array, `[]`
|
- `GET /api/v1/identity_proofs`: Returns an empty array, `[]`
|
||||||
|
|
||||||
### Endorsements
|
|
||||||
|
|
||||||
*Added in Mastodon 2.5.0*
|
|
||||||
|
|
||||||
- `GET /api/v1/endorsements`: Returns an empty array, `[]`
|
|
||||||
|
|
||||||
### Featured tags
|
### Featured tags
|
||||||
|
|
||||||
*Added in Mastodon 3.0.0*
|
*Added in Mastodon 3.0.0*
|
||||||
|
|
|
@ -342,6 +342,36 @@ See [Admin-API](admin_api.md)
|
||||||
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
* Note: Currently, Mastodon has no API for changing email. If they add it in future it might be incompatible with Pleroma.
|
* Note: Currently, Mastodon has no API for changing email. If they add it in future it might be incompatible with Pleroma.
|
||||||
|
|
||||||
|
## `/api/pleroma/move_account`
|
||||||
|
### Move account
|
||||||
|
* Method `POST`
|
||||||
|
* Authentication: required
|
||||||
|
* Params:
|
||||||
|
* `password`: user's password
|
||||||
|
* `target_account`: the nickname of the target account (e.g. `foo@example.org`)
|
||||||
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
|
* Note: This endpoint emits a `Move` activity to all followers of the current account. Some remote servers will automatically unfollow the current account and follow the target account upon seeing this, but this depends on the remote server implementation and cannot be guaranteed. For local followers , they will automatically unfollow and follow if and only if they have set the `allow_following_move` preference ("Allow auto-follow when following account moves").
|
||||||
|
|
||||||
|
## `/api/pleroma/aliases`
|
||||||
|
### Get aliases of the current account
|
||||||
|
* Method `GET`
|
||||||
|
* Authentication: required
|
||||||
|
* Response: JSON. Returns `{"aliases": [alias, ...]}`, where `alias` is the nickname of an alias, e.g. `foo@example.org`.
|
||||||
|
|
||||||
|
### Add alias to the current account
|
||||||
|
* Method `PUT`
|
||||||
|
* Authentication: required
|
||||||
|
* Params:
|
||||||
|
* `alias`: the nickname of the alias to add, e.g. `foo@example.org`.
|
||||||
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
|
|
||||||
|
### Delete alias from the current account
|
||||||
|
* Method `DELETE`
|
||||||
|
* Authentication: required
|
||||||
|
* Params:
|
||||||
|
* `alias`: the nickname of the alias to delete, e.g. `foo@example.org`.
|
||||||
|
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
|
||||||
|
|
||||||
# Pleroma Conversations
|
# Pleroma Conversations
|
||||||
|
|
||||||
Pleroma Conversations have the same general structure that Mastodon Conversations have. The behavior differs in the following ways when using these endpoints:
|
Pleroma Conversations have the same general structure that Mastodon Conversations have. The behavior differs in the following ways when using these endpoints:
|
||||||
|
@ -660,3 +690,77 @@ Emoji reactions work a lot like favourites do. They make it possible to react to
|
||||||
"url": "https://example.com/media/backups/archive-foobar-20200910T161803-QUhx6VYDRQ2wfV0SdA2Pfj_2CLM_ATUlw-D5l5TJf4Q.zip"
|
"url": "https://example.com/media/backups/archive-foobar-20200910T161803-QUhx6VYDRQ2wfV0SdA2Pfj_2CLM_ATUlw-D5l5TJf4Q.zip"
|
||||||
}]
|
}]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `GET /api/oauth_tokens`
|
||||||
|
### Retrieve a list of active sessions for the user
|
||||||
|
* Method: `GET`
|
||||||
|
* Authentication: required
|
||||||
|
* Params: none
|
||||||
|
* Response: JSON
|
||||||
|
* Example response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"app_name": "Pleroma FE",
|
||||||
|
"id": 9275,
|
||||||
|
"valid_until": "2121-11-24T15:51:08.234234"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"app_name": "Patron",
|
||||||
|
"id": 8805,
|
||||||
|
"valid_until": "2121-10-26T18:09:59.857150"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"app_name": "Soapbox FE",
|
||||||
|
"id": 9727,
|
||||||
|
"valid_until": "2121-12-25T16:52:39.692877"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `DELETE /api/oauth_tokens/:id`
|
||||||
|
### Revoke a user session by its ID
|
||||||
|
* Method: `DELETE`
|
||||||
|
* Authentication: required
|
||||||
|
* Params: none
|
||||||
|
* Response: HTTP 200 on success, 500 on error
|
||||||
|
|
||||||
|
## `/api/v1/pleroma/settings/:app`
|
||||||
|
### Gets settings for some application
|
||||||
|
* Method `GET`
|
||||||
|
* Authentication: `read:accounts`
|
||||||
|
|
||||||
|
* Response: JSON. The settings for that application, or empty object if there is none.
|
||||||
|
* Example response:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"some key": "some value"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Updates settings for some application
|
||||||
|
* Method `PATCH`
|
||||||
|
* Authentication: `write:accounts`
|
||||||
|
* Request body: JSON object. The object will be merged recursively with old settings. If some field is set to null, it is removed.
|
||||||
|
* Example request:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"some key": "some value",
|
||||||
|
"key to remove": null,
|
||||||
|
"nested field": {
|
||||||
|
"some key": "some value",
|
||||||
|
"key to remove": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
* Response: JSON. Updated (merged) settings for that application.
|
||||||
|
* Example response:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"some key": "some value",
|
||||||
|
"nested field": {
|
||||||
|
"some key": "some value",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
9
docs/development/setting_up_a_gitlab_runner.md
Normal file
9
docs/development/setting_up_a_gitlab_runner.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Setting up a Gitlab-runner
|
||||||
|
|
||||||
|
When you push changes, a pipeline will start some automated jobs. These are done with so called [runners](https://docs.gitlab.com/runner/), services that run somewhere on a server and run these automated jobs. These jobs typically run tests and should pass. If not, you probably need to fix something.
|
||||||
|
|
||||||
|
Generally, Pleroma provides a runner, so you don't need to set up your own. However, if for whatever reason you want to set up your own, here's some high level instructions.
|
||||||
|
|
||||||
|
1. We use docker to run the jobs, so you should install that. For Debian, you need to allow non-free packages in the [source list](https://wiki.debian.org/SourcesList). Then you can install docker with `apt install docker-compose`.
|
||||||
|
2. You can [install](https://docs.gitlab.com/runner/install/index.html) and [configure](https://docs.gitlab.com/runner/register/index.html) a Gitlab-runner. It's probably easiest to install from the packages, but there are other options as well.
|
||||||
|
3. When registering the runner, you'll need some values. You can find them in the project under your own name. Choose "Settings", "CI/CD", and then expand "Runners". For executor you can choose "docker". For default image, you can use the image used in <https://git.pleroma.social/pleroma/pleroma/-/blob/develop/.gitlab-ci.yml#L1> (although it shouldn't matter much).
|
|
@ -1,7 +1,7 @@
|
||||||
## Required dependencies
|
## Required dependencies
|
||||||
|
|
||||||
* PostgreSQL 9.6+
|
* PostgreSQL 9.6+
|
||||||
* Elixir 1.9+
|
* Elixir 1.10+
|
||||||
* Erlang OTP 22.2+
|
* Erlang OTP 22.2+
|
||||||
* git
|
* git
|
||||||
* file / libmagic
|
* file / libmagic
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
In this guide we cover how you can migrate from a from source installation to one using OTP releases.
|
In this guide we cover how you can migrate from a from source installation to one using OTP releases.
|
||||||
|
|
||||||
## Pre-requisites
|
## Pre-requisites
|
||||||
You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`.
|
You will be running commands as root. If you aren't root already, please elevate your privileges by executing `sudo su`/`su`.
|
||||||
|
|
||||||
The system needs to have `curl` and `unzip` installed for downloading and unpacking release builds.
|
The system needs to have `curl` and `unzip` installed for downloading and unpacking release builds.
|
||||||
|
|
||||||
|
|
15
docs/installation/nixos_en.md
Normal file
15
docs/installation/nixos_en.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Installing on NixOS
|
||||||
|
|
||||||
|
NixOS contains a source build package of pleroma and a NixOS module to install it.
|
||||||
|
For installation add this to your configuration.nix and add a config.exs next to it:
|
||||||
|
```nix
|
||||||
|
services.pleroma = {
|
||||||
|
enable = true;
|
||||||
|
configs = [ (lib.fileContents ./config.exs) ];
|
||||||
|
secretConfigFile = "/var/lib/pleroma/secret.exs";
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## Questions
|
||||||
|
The nix community uses matrix for communication: [#nix:nixos.org](https://matrix.to/#/#nix:nixos.org)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Optional software packages needed for specific functionality
|
# Optional software packages needed for specific functionality
|
||||||
|
|
||||||
For specific Pleroma functionality (which is disabled by default) some or all of the below packages are required:
|
For specific Pleroma functionality (which is disabled by default) some or all of the below packages are required:
|
||||||
* `ImageMagic`
|
* `ImageMagic`
|
||||||
* `ffmpeg`
|
* `ffmpeg`
|
||||||
* `exiftool`
|
* `exiftool`
|
||||||
|
|
||||||
Please refer to documentation in `docs/installation` on how to install them on specific OS.
|
Please refer to documentation in `docs/installation` on how to install them on specific OS.
|
||||||
|
|
||||||
|
@ -14,19 +14,20 @@ Note: the packages are not required with the current default settings of Pleroma
|
||||||
`ImageMagick` is a set of tools to create, edit, compose, or convert bitmap images.
|
`ImageMagick` is a set of tools to create, edit, compose, or convert bitmap images.
|
||||||
|
|
||||||
It is required for the following Pleroma features:
|
It is required for the following Pleroma features:
|
||||||
* `Pleroma.Upload.Filters.Mogrify`, `Pleroma.Upload.Filters.Mogrifun` upload filters (related config: `Plaroma.Upload/filters` in `config/config.exs`)
|
* `Pleroma.Upload.Filters.Mogrify`, `Pleroma.Upload.Filters.Mogrifun` upload filters (related config: `Plaroma.Upload/filters` in `config/config.exs`)
|
||||||
* Media preview proxy for still images (related config: `media_preview_proxy/enabled` in `config/config.exs`)
|
* Media preview proxy for still images (related config: `media_preview_proxy/enabled` in `config/config.exs`)
|
||||||
|
|
||||||
## `ffmpeg`
|
## `ffmpeg`
|
||||||
|
|
||||||
`ffmpeg` is software to record, convert and stream audio and video.
|
`ffmpeg` is software to record, convert and stream audio and video.
|
||||||
|
|
||||||
It is required for the following Pleroma features:
|
It is required for the following Pleroma features:
|
||||||
* Media preview proxy for videos (related config: `media_preview_proxy/enabled` in `config/config.exs`)
|
* Media preview proxy for videos (related config: `media_preview_proxy/enabled` in `config/config.exs`)
|
||||||
|
|
||||||
## `exiftool`
|
## `exiftool`
|
||||||
|
|
||||||
`exiftool` is media files metadata reader/writer.
|
`exiftool` is media files metadata reader/writer.
|
||||||
|
|
||||||
It is required for the following Pleroma features:
|
It is required for the following Pleroma features:
|
||||||
* `Pleroma.Upload.Filters.Exiftool` upload filter (related config: `Plaroma.Upload/filters` in `config/config.exs`)
|
* `Pleroma.Upload.Filters.Exiftool.StripLocation` upload filter (related config: `Plaroma.Upload/filters` in `config/config.exs`)
|
||||||
|
* `Pleroma.Upload.Filters.Exiftool.ReadDescription` upload filter (related config: `Plaroma.Upload/filters` in `config/config.exs`)
|
||||||
|
|
|
@ -8,7 +8,7 @@ This guide covers a installation using an OTP release. To install Pleroma from s
|
||||||
* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below
|
* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below
|
||||||
* A (sub)domain pointed to the machine
|
* A (sub)domain pointed to the machine
|
||||||
|
|
||||||
You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`.
|
You will be running commands as root. If you aren't root already, please elevate your privileges by executing `sudo su`/`su`.
|
||||||
|
|
||||||
While in theory OTP releases are possbile to install on any compatible machine, for the sake of simplicity this guide focuses only on Debian/Ubuntu and Alpine.
|
While in theory OTP releases are possbile to install on any compatible machine, for the sake of simplicity this guide focuses only on Debian/Ubuntu and Alpine.
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
elixir_version=1.9.4
|
elixir_version=1.10.4
|
||||||
erlang_version=22.3.4.1
|
erlang_version=22.3.4.1
|
||||||
|
|
|
@ -5,34 +5,13 @@
|
||||||
# 2. Copy this section into your Caddyfile and restart Caddy.
|
# 2. Copy this section into your Caddyfile and restart Caddy.
|
||||||
|
|
||||||
example.tld {
|
example.tld {
|
||||||
log /var/log/caddy/pleroma_access.log
|
log {
|
||||||
errors /var/log/caddy/pleroma_error.log
|
output file /var/log/caddy/pleroma.log
|
||||||
|
}
|
||||||
|
|
||||||
gzip
|
encode gzip
|
||||||
|
|
||||||
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
||||||
# and `localhost.` resolves to [::0] on some systems: see issue #930
|
# and `localhost.` resolves to [::0] on some systems: see issue #930
|
||||||
proxy / 127.0.0.1:4000 {
|
reverse_proxy 127.0.0.1:4000
|
||||||
websocket
|
|
||||||
transparent
|
|
||||||
}
|
|
||||||
|
|
||||||
tls {
|
|
||||||
# Remove the rest of the lines in here, if you want to support older devices
|
|
||||||
key_type p256
|
|
||||||
ciphers ECDHE-ECDSA-WITH-CHACHA20-POLY1305 ECDHE-RSA-WITH-CHACHA20-POLY1305 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256
|
|
||||||
}
|
|
||||||
|
|
||||||
# If you do not want to use the mediaproxy function, remove these lines.
|
|
||||||
# To use this directive, you need the http.cache plugin for Caddy.
|
|
||||||
cache {
|
|
||||||
match_path /media
|
|
||||||
default_max_age 720m
|
|
||||||
}
|
|
||||||
|
|
||||||
cache {
|
|
||||||
match_path /proxy
|
|
||||||
default_max_age 720m
|
|
||||||
}
|
|
||||||
# Stop removing lines here.
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -466,7 +466,7 @@
|
||||||
|
|
||||||
%% == PostgreSQL ==
|
%% == PostgreSQL ==
|
||||||
%% {rdbms, global, default, [{workers, 10}],
|
%% {rdbms, global, default, [{workers, 10}],
|
||||||
%% [{server, {pgsql, "server", 5432, "database", "username", "password"}}]},
|
%% [{server, {pgsql, "server", "port", "database", "username", "password"}}]},
|
||||||
|
|
||||||
%% == ODBC (MSSQL) ==
|
%% == ODBC (MSSQL) ==
|
||||||
%% {rdbms, global, default, [{workers, 10}],
|
%% {rdbms, global, default, [{workers, 10}],
|
||||||
|
|
|
@ -81,6 +81,19 @@ server {
|
||||||
proxy_pass http://phoenix;
|
proxy_pass http://phoenix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Uncomment this if you want notice compatibility routes for frontends like Soapbox.
|
||||||
|
# location ~ ^/@[^/]+/([^/]+)$ {
|
||||||
|
# proxy_pass http://phoenix/notice/$1;
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# location ~ ^/@[^/]+/posts/([^/]+)$ {
|
||||||
|
# proxy_pass http://phoenix/notice/$1;
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# location ~ ^/[^/]+/status/([^/]+)$ {
|
||||||
|
# proxy_pass http://phoenix/notice/$1;
|
||||||
|
# }
|
||||||
|
|
||||||
location ~ ^/(media|proxy) {
|
location ~ ^/(media|proxy) {
|
||||||
proxy_cache pleroma_media_cache;
|
proxy_cache pleroma_media_cache;
|
||||||
slice 1m;
|
slice 1m;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Recommended varnishncsa logging format: '%h %l %u %t "%m %{X-Forwarded-Proto}i://%{Host}i%U%q %H" %s %b "%{Referer}i" "%{User-agent}i"'
|
# Recommended varnishncsa logging format: '%h %l %u %t "%m %{X-Forwarded-Proto}i://%{Host}i%U%q %H" %s %b "%{Referer}i" "%{User-agent}i"'
|
||||||
|
# Please use Varnish 7.0+ for proper Range Requests / Chunked encoding support
|
||||||
vcl 4.1;
|
vcl 4.1;
|
||||||
import std;
|
import std;
|
||||||
|
|
||||||
|
@ -22,11 +23,6 @@ sub vcl_recv {
|
||||||
set req.http.X-Forwarded-Proto = "https";
|
set req.http.X-Forwarded-Proto = "https";
|
||||||
}
|
}
|
||||||
|
|
||||||
# CHUNKED SUPPORT
|
|
||||||
if (req.http.Range ~ "bytes=") {
|
|
||||||
set req.http.x-range = req.http.Range;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Pipe if WebSockets request is coming through
|
# Pipe if WebSockets request is coming through
|
||||||
if (req.http.upgrade ~ "(?i)websocket") {
|
if (req.http.upgrade ~ "(?i)websocket") {
|
||||||
return (pipe);
|
return (pipe);
|
||||||
|
@ -35,9 +31,9 @@ sub vcl_recv {
|
||||||
# Allow purging of the cache
|
# Allow purging of the cache
|
||||||
if (req.method == "PURGE") {
|
if (req.method == "PURGE") {
|
||||||
if (!client.ip ~ purge) {
|
if (!client.ip ~ purge) {
|
||||||
return(synth(405,"Not allowed."));
|
return (synth(405,"Not allowed."));
|
||||||
}
|
}
|
||||||
return(purge);
|
return (purge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,17 +49,11 @@ sub vcl_backend_response {
|
||||||
return (retry);
|
return (retry);
|
||||||
}
|
}
|
||||||
|
|
||||||
# CHUNKED SUPPORT
|
|
||||||
if (bereq.http.x-range ~ "bytes=" && beresp.status == 206) {
|
|
||||||
set beresp.ttl = 10m;
|
|
||||||
set beresp.http.CR = beresp.http.content-range;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Bypass cache for large files
|
# Bypass cache for large files
|
||||||
# 50000000 ~ 50MB
|
# 50000000 ~ 50MB
|
||||||
if (std.integer(beresp.http.content-length, 0) > 50000000) {
|
if (std.integer(beresp.http.content-length, 0) > 50000000) {
|
||||||
set beresp.uncacheable = true;
|
set beresp.uncacheable = true;
|
||||||
return(deliver);
|
return (deliver);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Don't cache objects that require authentication
|
# Don't cache objects that require authentication
|
||||||
|
@ -94,7 +84,7 @@ sub vcl_synth {
|
||||||
if (resp.status == 750) {
|
if (resp.status == 750) {
|
||||||
set resp.status = 301;
|
set resp.status = 301;
|
||||||
set resp.http.Location = req.http.x-redir;
|
set resp.http.Location = req.http.x-redir;
|
||||||
return(deliver);
|
return (deliver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,25 +96,12 @@ sub vcl_pipe {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub vcl_hash {
|
|
||||||
# CHUNKED SUPPORT
|
|
||||||
if (req.http.x-range ~ "bytes=") {
|
|
||||||
hash_data(req.http.x-range);
|
|
||||||
unset req.http.Range;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub vcl_backend_fetch {
|
sub vcl_backend_fetch {
|
||||||
# Be more lenient for slow servers on the fediverse
|
# Be more lenient for slow servers on the fediverse
|
||||||
if (bereq.url ~ "^/proxy/") {
|
if (bereq.url ~ "^/proxy/") {
|
||||||
set bereq.first_byte_timeout = 300s;
|
set bereq.first_byte_timeout = 300s;
|
||||||
}
|
}
|
||||||
|
|
||||||
# CHUNKED SUPPORT
|
|
||||||
if (bereq.http.x-range) {
|
|
||||||
set bereq.http.Range = bereq.http.x-range;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bereq.retries == 0) {
|
if (bereq.retries == 0) {
|
||||||
# Clean up the X-Varnish-Backend-503 flag that is used internally
|
# Clean up the X-Varnish-Backend-503 flag that is used internally
|
||||||
# to mark broken backend responses that should be retried.
|
# to mark broken backend responses that should be retried.
|
||||||
|
@ -143,14 +120,6 @@ sub vcl_backend_fetch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub vcl_deliver {
|
|
||||||
# CHUNKED SUPPORT
|
|
||||||
if (resp.http.CR) {
|
|
||||||
set resp.http.Content-Range = resp.http.CR;
|
|
||||||
unset resp.http.CR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub vcl_backend_error {
|
sub vcl_backend_error {
|
||||||
# Retry broken backend responses.
|
# Retry broken backend responses.
|
||||||
set bereq.http.X-Varnish-Backend-503 = "1";
|
set bereq.http.X-Varnish-Backend-503 = "1";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Pleroma do
|
defmodule Mix.Pleroma do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.App do
|
defmodule Mix.Tasks.Pleroma.App do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Benchmark do
|
defmodule Mix.Tasks.Pleroma.Benchmark do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Config do
|
defmodule Mix.Tasks.Pleroma.Config do
|
||||||
|
@ -304,13 +304,8 @@ defmodule Mix.Tasks.Pleroma.Config do
|
||||||
System.cmd("mix", ["format", path])
|
System.cmd("mix", ["format", path])
|
||||||
end
|
end
|
||||||
|
|
||||||
if Code.ensure_loaded?(Config.Reader) do
|
defp config_header, do: "import Config\r\n\r\n"
|
||||||
defp config_header, do: "import Config\r\n\r\n"
|
defp read_file(config_file), do: Config.Reader.read_imports!(config_file)
|
||||||
defp read_file(config_file), do: Config.Reader.read_imports!(config_file)
|
|
||||||
else
|
|
||||||
defp config_header, do: "use Mix.Config\r\n\r\n"
|
|
||||||
defp read_file(config_file), do: Mix.Config.eval!(config_file)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp write_and_delete(config, file, delete?) do
|
defp write_and_delete(config, file, delete?) do
|
||||||
config
|
config
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.CountStatuses do
|
defmodule Mix.Tasks.Pleroma.CountStatuses do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Database do
|
defmodule Mix.Tasks.Pleroma.Database do
|
||||||
|
@ -154,9 +154,8 @@ defmodule Mix.Tasks.Pleroma.Database do
|
||||||
|> join(:inner, [a], o in Object,
|
|> join(:inner, [a], o in Object,
|
||||||
on:
|
on:
|
||||||
fragment(
|
fragment(
|
||||||
"(?->>'id') = COALESCE((?)->'object'->> 'id', (?)->>'object')",
|
"(?->>'id') = associated_object_id((?))",
|
||||||
o.data,
|
o.data,
|
||||||
a.data,
|
|
||||||
a.data
|
a.data
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Digest do
|
defmodule Mix.Tasks.Pleroma.Digest do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Docs do
|
defmodule Mix.Tasks.Pleroma.Docs do
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-onl
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Ecto do
|
defmodule Mix.Tasks.Pleroma.Ecto do
|
||||||
@doc """
|
@doc """
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-onl
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Ecto.Migrate do
|
defmodule Mix.Tasks.Pleroma.Ecto.Migrate do
|
||||||
use Mix.Task
|
use Mix.Task
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-onl
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
|
defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
|
||||||
use Mix.Task
|
use Mix.Task
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Email do
|
defmodule Mix.Tasks.Pleroma.Email do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Emoji do
|
defmodule Mix.Tasks.Pleroma.Emoji do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Frontend do
|
defmodule Mix.Tasks.Pleroma.Frontend do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Instance do
|
defmodule Mix.Tasks.Pleroma.Instance do
|
||||||
|
@ -34,7 +34,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
||||||
static_dir: :string,
|
static_dir: :string,
|
||||||
listen_ip: :string,
|
listen_ip: :string,
|
||||||
listen_port: :string,
|
listen_port: :string,
|
||||||
strip_uploads: :string,
|
strip_uploads_location: :string,
|
||||||
|
read_uploads_description: :string,
|
||||||
anonymize_uploads: :string,
|
anonymize_uploads: :string,
|
||||||
dedupe_uploads: :string
|
dedupe_uploads: :string
|
||||||
],
|
],
|
||||||
|
@ -161,7 +162,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
||||||
)
|
)
|
||||||
|> Path.expand()
|
|> Path.expand()
|
||||||
|
|
||||||
{strip_uploads_message, strip_uploads_default} =
|
{strip_uploads_location_message, strip_uploads_location_default} =
|
||||||
if Pleroma.Utils.command_available?("exiftool") do
|
if Pleroma.Utils.command_available?("exiftool") do
|
||||||
{"Do you want to strip location (GPS) data from uploaded images? This requires exiftool, it was detected as installed. (y/n)",
|
{"Do you want to strip location (GPS) data from uploaded images? This requires exiftool, it was detected as installed. (y/n)",
|
||||||
"y"}
|
"y"}
|
||||||
|
@ -170,12 +171,29 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
||||||
"n"}
|
"n"}
|
||||||
end
|
end
|
||||||
|
|
||||||
strip_uploads =
|
strip_uploads_location =
|
||||||
get_option(
|
get_option(
|
||||||
options,
|
options,
|
||||||
:strip_uploads,
|
:strip_uploads_location,
|
||||||
strip_uploads_message,
|
strip_uploads_location_message,
|
||||||
strip_uploads_default
|
strip_uploads_location_default
|
||||||
|
) === "y"
|
||||||
|
|
||||||
|
{read_uploads_description_message, read_uploads_description_default} =
|
||||||
|
if Pleroma.Utils.command_available?("exiftool") do
|
||||||
|
{"Do you want to read data from uploaded files so clients can use it to prefill fields like image description? This requires exiftool, it was detected as installed. (y/n)",
|
||||||
|
"y"}
|
||||||
|
else
|
||||||
|
{"Do you want to read data from uploaded files so clients can use it to prefill fields like image description? This requires exiftool, it was detected as not installed, please install it if you answer yes. (y/n)",
|
||||||
|
"n"}
|
||||||
|
end
|
||||||
|
|
||||||
|
read_uploads_description =
|
||||||
|
get_option(
|
||||||
|
options,
|
||||||
|
:read_uploads_description,
|
||||||
|
read_uploads_description_message,
|
||||||
|
read_uploads_description_default
|
||||||
) === "y"
|
) === "y"
|
||||||
|
|
||||||
anonymize_uploads =
|
anonymize_uploads =
|
||||||
|
@ -229,7 +247,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
||||||
listen_port: listen_port,
|
listen_port: listen_port,
|
||||||
upload_filters:
|
upload_filters:
|
||||||
upload_filters(%{
|
upload_filters(%{
|
||||||
strip: strip_uploads,
|
strip_location: strip_uploads_location,
|
||||||
|
read_description: read_uploads_description,
|
||||||
anonymize: anonymize_uploads,
|
anonymize: anonymize_uploads,
|
||||||
dedupe: dedupe_uploads
|
dedupe: dedupe_uploads
|
||||||
})
|
})
|
||||||
|
@ -297,12 +316,19 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
||||||
|
|
||||||
defp upload_filters(filters) when is_map(filters) do
|
defp upload_filters(filters) when is_map(filters) do
|
||||||
enabled_filters =
|
enabled_filters =
|
||||||
if filters.strip do
|
if filters.strip_location do
|
||||||
[Pleroma.Upload.Filter.Exiftool]
|
[Pleroma.Upload.Filter.Exiftool.StripLocation]
|
||||||
else
|
else
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
enabled_filters =
|
||||||
|
if filters.read_description do
|
||||||
|
enabled_filters ++ [Pleroma.Upload.Filter.Exiftool.ReadDescription]
|
||||||
|
else
|
||||||
|
enabled_filters
|
||||||
|
end
|
||||||
|
|
||||||
enabled_filters =
|
enabled_filters =
|
||||||
if filters.anonymize do
|
if filters.anonymize do
|
||||||
enabled_filters ++ [Pleroma.Upload.Filter.AnonymizeFilename]
|
enabled_filters ++ [Pleroma.Upload.Filter.AnonymizeFilename]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.NotificationSettings do
|
defmodule Mix.Tasks.Pleroma.NotificationSettings do
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.OpenapiSpec do
|
defmodule Mix.Tasks.Pleroma.OpenapiSpec do
|
||||||
def run([path]) do
|
def run([path]) do
|
||||||
# Load Pleroma application to get version info
|
# Load Pleroma application to get version info
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.RefreshCounterCache do
|
defmodule Mix.Tasks.Pleroma.RefreshCounterCache do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Relay do
|
defmodule Mix.Tasks.Pleroma.Relay do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.RobotsTxt do
|
defmodule Mix.Tasks.Pleroma.RobotsTxt do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Uploads do
|
defmodule Mix.Tasks.Pleroma.Uploads do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.User do
|
defmodule Mix.Tasks.Pleroma.User do
|
||||||
|
@ -112,9 +112,10 @@ defmodule Mix.Tasks.Pleroma.User do
|
||||||
{:ok, token} <- Pleroma.PasswordResetToken.create_token(user) do
|
{:ok, token} <- Pleroma.PasswordResetToken.create_token(user) do
|
||||||
shell_info("Generated password reset token for #{user.nickname}")
|
shell_info("Generated password reset token for #{user.nickname}")
|
||||||
|
|
||||||
IO.puts("URL: #{Pleroma.Web.Router.Helpers.reset_password_url(Pleroma.Web.Endpoint,
|
url =
|
||||||
:reset,
|
Pleroma.Web.Router.Helpers.reset_password_url(Pleroma.Web.Endpoint, :reset, token.token)
|
||||||
token.token)}")
|
|
||||||
|
IO.puts("URL: #{url}")
|
||||||
else
|
else
|
||||||
_ ->
|
_ ->
|
||||||
shell_error("No local user #{nickname}")
|
shell_error("No local user #{nickname}")
|
||||||
|
@ -421,6 +422,38 @@ defmodule Mix.Tasks.Pleroma.User do
|
||||||
|> Stream.run()
|
|> Stream.run()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def run(["fix_follow_state", local_user, remote_user]) do
|
||||||
|
start_pleroma()
|
||||||
|
|
||||||
|
with {:local, %User{} = local} <- {:local, User.get_by_nickname(local_user)},
|
||||||
|
{:remote, %User{} = remote} <- {:remote, User.get_by_nickname(remote_user)},
|
||||||
|
{:follow_data, %{data: %{"state" => request_state}}} <-
|
||||||
|
{:follow_data, Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(local, remote)} do
|
||||||
|
calculated_state = User.following?(local, remote)
|
||||||
|
|
||||||
|
shell_info(
|
||||||
|
"Request state is #{request_state}, vs calculated state of following=#{calculated_state}"
|
||||||
|
)
|
||||||
|
|
||||||
|
if calculated_state == false && request_state == "accept" do
|
||||||
|
shell_info("Discrepancy found, fixing")
|
||||||
|
Pleroma.Web.CommonAPI.reject_follow_request(local, remote)
|
||||||
|
shell_info("Relationship fixed")
|
||||||
|
else
|
||||||
|
shell_info("No discrepancy found")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
{:local, _} ->
|
||||||
|
shell_error("No local user #{local_user}")
|
||||||
|
|
||||||
|
{:remote, _} ->
|
||||||
|
shell_error("No remote user #{remote_user}")
|
||||||
|
|
||||||
|
{:follow_data, _} ->
|
||||||
|
shell_error("No follow data for #{local_user} and #{remote_user}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
defp set_moderator(user, value) do
|
defp set_moderator(user, value) do
|
||||||
{:ok, user} =
|
{:ok, user} =
|
||||||
user
|
user
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Phoenix.Transports.WebSocket.Raw do
|
defmodule Phoenix.Transports.WebSocket.Raw do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Activity do
|
defmodule Pleroma.Activity do
|
||||||
|
@ -53,7 +53,7 @@ defmodule Pleroma.Activity do
|
||||||
#
|
#
|
||||||
# ```
|
# ```
|
||||||
# |> join(:inner, [activity], o in Object,
|
# |> join(:inner, [activity], o in Object,
|
||||||
# on: fragment("(?->>'id') = COALESCE((?)->'object'->> 'id', (?)->>'object')",
|
# on: fragment("(?->>'id') = associated_object_id((?))",
|
||||||
# o.data, activity.data, activity.data))
|
# o.data, activity.data, activity.data))
|
||||||
# |> preload([activity, object], [object: object])
|
# |> preload([activity, object], [object: object])
|
||||||
# ```
|
# ```
|
||||||
|
@ -69,9 +69,8 @@ defmodule Pleroma.Activity do
|
||||||
join(query, join_type, [activity], o in Object,
|
join(query, join_type, [activity], o in Object,
|
||||||
on:
|
on:
|
||||||
fragment(
|
fragment(
|
||||||
"(?->>'id') = COALESCE(?->'object'->>'id', ?->>'object')",
|
"(?->>'id') = associated_object_id(?)",
|
||||||
o.data,
|
o.data,
|
||||||
activity.data,
|
|
||||||
activity.data
|
activity.data
|
||||||
),
|
),
|
||||||
as: :object
|
as: :object
|
||||||
|
@ -362,9 +361,11 @@ defmodule Pleroma.Activity do
|
||||||
end
|
end
|
||||||
|
|
||||||
def restrict_deactivated_users(query) do
|
def restrict_deactivated_users(query) do
|
||||||
deactivated_users_query = from(u in User.Query.build(%{deactivated: true}), select: u.ap_id)
|
query
|
||||||
|
|> join(:inner, [activity], user in User,
|
||||||
from(activity in query, where: activity.actor not in subquery(deactivated_users_query))
|
as: :user,
|
||||||
|
on: activity.actor == user.ap_id and user.is_active == true
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
defdelegate search(user, query, options \\ []), to: Pleroma.Activity.Search
|
defdelegate search(user, query, options \\ []), to: Pleroma.Activity.Search
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Activity.HTML do
|
defmodule Pleroma.Activity.HTML do
|
||||||
|
@ -8,6 +8,40 @@ defmodule Pleroma.Activity.HTML do
|
||||||
|
|
||||||
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
||||||
|
|
||||||
|
# We store a list of cache keys related to an activity in a
|
||||||
|
# separate cache, scrubber_management_cache. It has the same
|
||||||
|
# size as scrubber_cache (see application.ex). Every time we add
|
||||||
|
# a cache to scrubber_cache, we update scrubber_management_cache.
|
||||||
|
#
|
||||||
|
# The most recent write of a certain key in the management cache
|
||||||
|
# is the same as the most recent write of any record related to that
|
||||||
|
# key in the main cache.
|
||||||
|
# Assuming LRW ( https://hexdocs.pm/cachex/Cachex.Policy.LRW.html ),
|
||||||
|
# this means when the management cache is evicted by cachex, all
|
||||||
|
# related records in the main cache will also have been evicted.
|
||||||
|
|
||||||
|
defp get_cache_keys_for(activity_id) do
|
||||||
|
with {:ok, list} when is_list(list) <- @cachex.get(:scrubber_management_cache, activity_id) do
|
||||||
|
list
|
||||||
|
else
|
||||||
|
_ -> []
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp add_cache_key_for(activity_id, additional_key) do
|
||||||
|
current = get_cache_keys_for(activity_id)
|
||||||
|
|
||||||
|
unless additional_key in current do
|
||||||
|
@cachex.put(:scrubber_management_cache, activity_id, [additional_key | current])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def invalidate_cache_for(activity_id) do
|
||||||
|
keys = get_cache_keys_for(activity_id)
|
||||||
|
Enum.map(keys, &@cachex.del(:scrubber_cache, &1))
|
||||||
|
@cachex.del(:scrubber_management_cache, activity_id)
|
||||||
|
end
|
||||||
|
|
||||||
def get_cached_scrubbed_html_for_activity(
|
def get_cached_scrubbed_html_for_activity(
|
||||||
content,
|
content,
|
||||||
scrubbers,
|
scrubbers,
|
||||||
|
@ -19,6 +53,8 @@ defmodule Pleroma.Activity.HTML do
|
||||||
|
|
||||||
@cachex.fetch!(:scrubber_cache, key, fn _key ->
|
@cachex.fetch!(:scrubber_cache, key, fn _key ->
|
||||||
object = Object.normalize(activity, fetch: false)
|
object = Object.normalize(activity, fetch: false)
|
||||||
|
|
||||||
|
add_cache_key_for(activity.id, key)
|
||||||
HTML.ensure_scrubbed_html(content, scrubbers, object.data["fake"] || false, callback)
|
HTML.ensure_scrubbed_html(content, scrubbers, object.data["fake"] || false, callback)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Activity.Ir.Topics do
|
defmodule Pleroma.Activity.Ir.Topics do
|
||||||
|
@ -13,6 +13,14 @@ defmodule Pleroma.Activity.Ir.Topics do
|
||||||
|> List.flatten()
|
|> List.flatten()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp generate_topics(%{data: %{"type" => "ChatMessage"}}, %{data: %{"type" => "Delete"}}) do
|
||||||
|
["user", "user:pleroma_chat"]
|
||||||
|
end
|
||||||
|
|
||||||
|
defp generate_topics(%{data: %{"type" => "ChatMessage"}}, %{data: %{"type" => "Create"}}) do
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
|
||||||
defp generate_topics(%{data: %{"type" => "Answer"}}, _) do
|
defp generate_topics(%{data: %{"type" => "Answer"}}, _) do
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
|
@ -21,7 +29,7 @@ defmodule Pleroma.Activity.Ir.Topics do
|
||||||
["user", "list"] ++ visibility_tags(object, activity)
|
["user", "list"] ++ visibility_tags(object, activity)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp visibility_tags(object, activity) do
|
defp visibility_tags(object, %{data: %{"type" => type}} = activity) when type != "Announce" do
|
||||||
case Visibility.get_visibility(activity) do
|
case Visibility.get_visibility(activity) do
|
||||||
"public" ->
|
"public" ->
|
||||||
if activity.local do
|
if activity.local do
|
||||||
|
@ -31,6 +39,10 @@ defmodule Pleroma.Activity.Ir.Topics do
|
||||||
end
|
end
|
||||||
|> item_creation_tags(object, activity)
|
|> item_creation_tags(object, activity)
|
||||||
|
|
||||||
|
"local" ->
|
||||||
|
["public:local"]
|
||||||
|
|> item_creation_tags(object, activity)
|
||||||
|
|
||||||
"direct" ->
|
"direct" ->
|
||||||
["direct"]
|
["direct"]
|
||||||
|
|
||||||
|
@ -39,6 +51,10 @@ defmodule Pleroma.Activity.Ir.Topics do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp visibility_tags(_object, _activity) do
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
|
||||||
defp item_creation_tags(tags, object, %{data: %{"type" => "Create"}} = activity) do
|
defp item_creation_tags(tags, object, %{data: %{"type" => "Create"}} = activity) do
|
||||||
tags ++
|
tags ++
|
||||||
remote_topics(activity) ++ hashtags_to_topics(object) ++ attachment_topics(object, activity)
|
remote_topics(activity) ++ hashtags_to_topics(object) ++ attachment_topics(object, activity)
|
||||||
|
@ -63,7 +79,18 @@ defmodule Pleroma.Activity.Ir.Topics do
|
||||||
|
|
||||||
defp attachment_topics(%{data: %{"attachment" => []}}, _act), do: []
|
defp attachment_topics(%{data: %{"attachment" => []}}, _act), do: []
|
||||||
|
|
||||||
defp attachment_topics(_object, %{local: true}), do: ["public:media", "public:local:media"]
|
defp attachment_topics(_object, %{local: true} = activity) do
|
||||||
|
case Visibility.get_visibility(activity) do
|
||||||
|
"public" ->
|
||||||
|
["public:media", "public:local:media"]
|
||||||
|
|
||||||
|
"local" ->
|
||||||
|
["public:local:media"]
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
defp attachment_topics(_object, %{actor: actor}) when is_binary(actor),
|
defp attachment_topics(_object, %{actor: actor}) when is_binary(actor),
|
||||||
do: ["public:media", "public:remote:media:" <> URI.parse(actor).host]
|
do: ["public:media", "public:remote:media:" <> URI.parse(actor).host]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Activity.Queries do
|
defmodule Pleroma.Activity.Queries do
|
||||||
|
@ -52,8 +52,7 @@ defmodule Pleroma.Activity.Queries do
|
||||||
activity in query,
|
activity in query,
|
||||||
where:
|
where:
|
||||||
fragment(
|
fragment(
|
||||||
"coalesce((?)->'object'->>'id', (?)->>'object') = ANY(?)",
|
"associated_object_id((?)) = ANY(?)",
|
||||||
activity.data,
|
|
||||||
activity.data,
|
activity.data,
|
||||||
^object_ids
|
^object_ids
|
||||||
)
|
)
|
||||||
|
@ -64,8 +63,7 @@ defmodule Pleroma.Activity.Queries do
|
||||||
from(activity in query,
|
from(activity in query,
|
||||||
where:
|
where:
|
||||||
fragment(
|
fragment(
|
||||||
"coalesce((?)->'object'->>'id', (?)->>'object') = ?",
|
"associated_object_id((?)) = ?",
|
||||||
activity.data,
|
|
||||||
activity.data,
|
activity.data,
|
||||||
^object_id
|
^object_id
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Activity.Search do
|
defmodule Pleroma.Activity.Search do
|
||||||
|
@ -30,7 +30,7 @@ defmodule Pleroma.Activity.Search do
|
||||||
Activity
|
Activity
|
||||||
|> Activity.with_preloaded_object()
|
|> Activity.with_preloaded_object()
|
||||||
|> Activity.restrict_deactivated_users()
|
|> Activity.restrict_deactivated_users()
|
||||||
|> restrict_public()
|
|> restrict_public(user)
|
||||||
|> query_with(index_type, search_query, search_function)
|
|> query_with(index_type, search_query, search_function)
|
||||||
|> maybe_restrict_local(user)
|
|> maybe_restrict_local(user)
|
||||||
|> maybe_restrict_author(author)
|
|> maybe_restrict_author(author)
|
||||||
|
@ -57,7 +57,19 @@ defmodule Pleroma.Activity.Search do
|
||||||
|
|
||||||
def maybe_restrict_blocked(query, _), do: query
|
def maybe_restrict_blocked(query, _), do: query
|
||||||
|
|
||||||
defp restrict_public(q) do
|
defp restrict_public(q, user) when not is_nil(user) do
|
||||||
|
intended_recipients = [
|
||||||
|
Pleroma.Constants.as_public(),
|
||||||
|
Pleroma.Web.ActivityPub.Utils.as_local_public()
|
||||||
|
]
|
||||||
|
|
||||||
|
from([a, o] in q,
|
||||||
|
where: fragment("?->>'type' = 'Create'", a.data),
|
||||||
|
where: fragment("? && ?", ^intended_recipients, a.recipients)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp restrict_public(q, _user) do
|
||||||
from([a, o] in q,
|
from([a, o] in q,
|
||||||
where: fragment("?->>'type' = 'Create'", a.data),
|
where: fragment("?->>'type' = 'Create'", a.data),
|
||||||
where: ^Pleroma.Constants.as_public() in a.recipients
|
where: ^Pleroma.Constants.as_public() in a.recipients
|
||||||
|
|
160
lib/pleroma/announcement.ex
Normal file
160
lib/pleroma/announcement.ex
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.Announcement do
|
||||||
|
use Ecto.Schema
|
||||||
|
|
||||||
|
import Ecto.Changeset, only: [cast: 3, validate_required: 2]
|
||||||
|
import Ecto.Query
|
||||||
|
|
||||||
|
alias Pleroma.AnnouncementReadRelationship
|
||||||
|
alias Pleroma.Repo
|
||||||
|
|
||||||
|
@type t :: %__MODULE__{}
|
||||||
|
@primary_key {:id, FlakeId.Ecto.CompatType, autogenerate: true}
|
||||||
|
|
||||||
|
schema "announcements" do
|
||||||
|
field(:data, :map)
|
||||||
|
field(:starts_at, :utc_datetime)
|
||||||
|
field(:ends_at, :utc_datetime)
|
||||||
|
field(:rendered, :map)
|
||||||
|
|
||||||
|
timestamps(type: :utc_datetime)
|
||||||
|
end
|
||||||
|
|
||||||
|
def change(struct, params \\ %{}) do
|
||||||
|
struct
|
||||||
|
|> cast(validate_params(struct, params), [:data, :starts_at, :ends_at, :rendered])
|
||||||
|
|> validate_required([:data])
|
||||||
|
end
|
||||||
|
|
||||||
|
defp validate_params(struct, params) do
|
||||||
|
base_data =
|
||||||
|
%{
|
||||||
|
"content" => "",
|
||||||
|
"all_day" => false
|
||||||
|
}
|
||||||
|
|> Map.merge((struct && struct.data) || %{})
|
||||||
|
|
||||||
|
merged_data =
|
||||||
|
Map.merge(base_data, params.data)
|
||||||
|
|> Map.take(["content", "all_day"])
|
||||||
|
|
||||||
|
params
|
||||||
|
|> Map.merge(%{data: merged_data})
|
||||||
|
|> add_rendered_properties()
|
||||||
|
end
|
||||||
|
|
||||||
|
def add_rendered_properties(params) do
|
||||||
|
{content_html, _, _} =
|
||||||
|
Pleroma.Web.CommonAPI.Utils.format_input(params.data["content"], "text/plain",
|
||||||
|
mentions_format: :full
|
||||||
|
)
|
||||||
|
|
||||||
|
rendered = %{
|
||||||
|
"content" => content_html
|
||||||
|
}
|
||||||
|
|
||||||
|
params
|
||||||
|
|> Map.put(:rendered, rendered)
|
||||||
|
end
|
||||||
|
|
||||||
|
def add(params) do
|
||||||
|
changeset = change(%__MODULE__{}, params)
|
||||||
|
|
||||||
|
Repo.insert(changeset)
|
||||||
|
end
|
||||||
|
|
||||||
|
def update(announcement, params) do
|
||||||
|
changeset = change(announcement, params)
|
||||||
|
|
||||||
|
Repo.update(changeset)
|
||||||
|
end
|
||||||
|
|
||||||
|
def list_all do
|
||||||
|
__MODULE__
|
||||||
|
|> Repo.all()
|
||||||
|
end
|
||||||
|
|
||||||
|
def list_paginated(%{limit: limited_number, offset: offset_number}) do
|
||||||
|
__MODULE__
|
||||||
|
|> limit(^limited_number)
|
||||||
|
|> offset(^offset_number)
|
||||||
|
|> Repo.all()
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_by_id(id) do
|
||||||
|
Repo.get_by(__MODULE__, id: id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def delete_by_id(id) do
|
||||||
|
with announcement when not is_nil(announcement) <- get_by_id(id),
|
||||||
|
{:ok, _} <- Repo.delete(announcement) do
|
||||||
|
:ok
|
||||||
|
else
|
||||||
|
_ ->
|
||||||
|
:error
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def read_by?(announcement, user) do
|
||||||
|
AnnouncementReadRelationship.exists?(user, announcement)
|
||||||
|
end
|
||||||
|
|
||||||
|
def mark_read_by(announcement, user) do
|
||||||
|
AnnouncementReadRelationship.mark_read(user, announcement)
|
||||||
|
end
|
||||||
|
|
||||||
|
def render_json(announcement, opts \\ []) do
|
||||||
|
extra_params =
|
||||||
|
case Keyword.fetch(opts, :for) do
|
||||||
|
{:ok, user} when not is_nil(user) ->
|
||||||
|
%{read: read_by?(announcement, user)}
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
%{}
|
||||||
|
end
|
||||||
|
|
||||||
|
admin_extra_params =
|
||||||
|
case Keyword.fetch(opts, :admin) do
|
||||||
|
{:ok, true} ->
|
||||||
|
%{pleroma: %{raw_content: announcement.data["content"]}}
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
%{}
|
||||||
|
end
|
||||||
|
|
||||||
|
base = %{
|
||||||
|
id: announcement.id,
|
||||||
|
content: announcement.rendered["content"],
|
||||||
|
starts_at: announcement.starts_at,
|
||||||
|
ends_at: announcement.ends_at,
|
||||||
|
all_day: announcement.data["all_day"],
|
||||||
|
published_at: announcement.inserted_at,
|
||||||
|
updated_at: announcement.updated_at,
|
||||||
|
mentions: [],
|
||||||
|
statuses: [],
|
||||||
|
tags: [],
|
||||||
|
emojis: [],
|
||||||
|
reactions: []
|
||||||
|
}
|
||||||
|
|
||||||
|
base
|
||||||
|
|> Map.merge(extra_params)
|
||||||
|
|> Map.merge(admin_extra_params)
|
||||||
|
end
|
||||||
|
|
||||||
|
# "visible" means:
|
||||||
|
# starts_at < time < ends_at
|
||||||
|
def list_all_visible_when(time) do
|
||||||
|
__MODULE__
|
||||||
|
|> where([a], is_nil(a.starts_at) or a.starts_at < ^time)
|
||||||
|
|> where([a], is_nil(a.ends_at) or a.ends_at > ^time)
|
||||||
|
|> Repo.all()
|
||||||
|
end
|
||||||
|
|
||||||
|
def list_all_visible do
|
||||||
|
list_all_visible_when(DateTime.now("Etc/UTC") |> elem(1))
|
||||||
|
end
|
||||||
|
end
|
55
lib/pleroma/announcement_read_relationship.ex
Normal file
55
lib/pleroma/announcement_read_relationship.ex
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.AnnouncementReadRelationship do
|
||||||
|
use Ecto.Schema
|
||||||
|
|
||||||
|
import Ecto.Changeset
|
||||||
|
|
||||||
|
alias FlakeId.Ecto.CompatType
|
||||||
|
alias Pleroma.Announcement
|
||||||
|
alias Pleroma.Repo
|
||||||
|
alias Pleroma.User
|
||||||
|
|
||||||
|
@type t :: %__MODULE__{}
|
||||||
|
|
||||||
|
schema "announcement_read_relationships" do
|
||||||
|
belongs_to(:user, User, type: CompatType)
|
||||||
|
belongs_to(:announcement, Announcement, type: CompatType)
|
||||||
|
|
||||||
|
timestamps(updated_at: false)
|
||||||
|
end
|
||||||
|
|
||||||
|
def mark_read(user, announcement) do
|
||||||
|
%__MODULE__{}
|
||||||
|
|> cast(%{user_id: user.id, announcement_id: announcement.id}, [:user_id, :announcement_id])
|
||||||
|
|> validate_required([:user_id, :announcement_id])
|
||||||
|
|> foreign_key_constraint(:user_id)
|
||||||
|
|> foreign_key_constraint(:announcement_id)
|
||||||
|
|> unique_constraint([:user_id, :announcement_id])
|
||||||
|
|> Repo.insert()
|
||||||
|
end
|
||||||
|
|
||||||
|
def mark_unread(user, announcement) do
|
||||||
|
with relationship <- get(user, announcement),
|
||||||
|
{:exists, true} <- {:exists, not is_nil(relationship)},
|
||||||
|
{:ok, _} <- Repo.delete(relationship) do
|
||||||
|
:ok
|
||||||
|
else
|
||||||
|
{:exists, false} ->
|
||||||
|
:ok
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
:error
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get(user, announcement) do
|
||||||
|
Repo.get_by(__MODULE__, user_id: user.id, announcement_id: announcement.id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def exists?(user, announcement) do
|
||||||
|
not is_nil(get(user, announcement))
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Application do
|
defmodule Pleroma.Application do
|
||||||
|
@ -94,7 +94,8 @@ defmodule Pleroma.Application do
|
||||||
Pleroma.Repo,
|
Pleroma.Repo,
|
||||||
Config.TransferTask,
|
Config.TransferTask,
|
||||||
Pleroma.Emoji,
|
Pleroma.Emoji,
|
||||||
Pleroma.Web.Plugs.RateLimiter.Supervisor
|
Pleroma.Web.Plugs.RateLimiter.Supervisor,
|
||||||
|
{Task.Supervisor, name: Pleroma.TaskSupervisor}
|
||||||
] ++
|
] ++
|
||||||
cachex_children() ++
|
cachex_children() ++
|
||||||
http_children(adapter, @mix_env) ++
|
http_children(adapter, @mix_env) ++
|
||||||
|
@ -112,7 +113,17 @@ defmodule Pleroma.Application do
|
||||||
|
|
||||||
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
|
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
|
||||||
# for other strategies and supported options
|
# for other strategies and supported options
|
||||||
opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
|
# If we have a lot of caches, default max_restarts can cause test
|
||||||
|
# resets to fail.
|
||||||
|
# Go for the default 3 unless we're in test
|
||||||
|
max_restarts =
|
||||||
|
if @mix_env == :test do
|
||||||
|
100
|
||||||
|
else
|
||||||
|
3
|
||||||
|
end
|
||||||
|
|
||||||
|
opts = [strategy: :one_for_one, name: Pleroma.Supervisor, max_restarts: max_restarts]
|
||||||
result = Supervisor.start_link(children, opts)
|
result = Supervisor.start_link(children, opts)
|
||||||
|
|
||||||
set_postgres_server_version()
|
set_postgres_server_version()
|
||||||
|
@ -189,6 +200,7 @@ defmodule Pleroma.Application do
|
||||||
build_cachex("object", default_ttl: 25_000, ttl_interval: 1000, limit: 2500),
|
build_cachex("object", default_ttl: 25_000, ttl_interval: 1000, limit: 2500),
|
||||||
build_cachex("rich_media", default_ttl: :timer.minutes(120), limit: 5000),
|
build_cachex("rich_media", default_ttl: :timer.minutes(120), limit: 5000),
|
||||||
build_cachex("scrubber", limit: 2500),
|
build_cachex("scrubber", limit: 2500),
|
||||||
|
build_cachex("scrubber_management", limit: 2500),
|
||||||
build_cachex("idempotency", expiration: idempotency_expiration(), limit: 2500),
|
build_cachex("idempotency", expiration: idempotency_expiration(), limit: 2500),
|
||||||
build_cachex("web_resp", limit: 2500),
|
build_cachex("web_resp", limit: 2500),
|
||||||
build_cachex("emoji_packs", expiration: emoji_packs_expiration(), limit: 10),
|
build_cachex("emoji_packs", expiration: emoji_packs_expiration(), limit: 10),
|
||||||
|
@ -197,7 +209,8 @@ defmodule Pleroma.Application do
|
||||||
build_cachex("chat_message_id_idempotency_key",
|
build_cachex("chat_message_id_idempotency_key",
|
||||||
expiration: chat_message_id_idempotency_key_expiration(),
|
expiration: chat_message_id_idempotency_key_expiration(),
|
||||||
limit: 500_000
|
limit: 500_000
|
||||||
)
|
),
|
||||||
|
build_cachex("rel_me", limit: 2500)
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -238,7 +251,8 @@ defmodule Pleroma.Application do
|
||||||
|
|
||||||
defp background_migrators do
|
defp background_migrators do
|
||||||
[
|
[
|
||||||
Pleroma.Migrators.HashtagsTableMigrator
|
Pleroma.Migrators.HashtagsTableMigrator,
|
||||||
|
Pleroma.Migrators.ContextObjectsDeletionMigrator
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.ApplicationRequirements do
|
defmodule Pleroma.ApplicationRequirements do
|
||||||
|
@ -164,7 +164,8 @@ defmodule Pleroma.ApplicationRequirements do
|
||||||
|
|
||||||
defp check_system_commands!(:ok) do
|
defp check_system_commands!(:ok) do
|
||||||
filter_commands_statuses = [
|
filter_commands_statuses = [
|
||||||
check_filter(Pleroma.Upload.Filter.Exiftool, "exiftool"),
|
check_filter(Pleroma.Upload.Filter.Exiftool.StripLocation, "exiftool"),
|
||||||
|
check_filter(Pleroma.Upload.Filter.Exiftool.ReadDescription, "exiftool"),
|
||||||
check_filter(Pleroma.Upload.Filter.Mogrify, "mogrify"),
|
check_filter(Pleroma.Upload.Filter.Mogrify, "mogrify"),
|
||||||
check_filter(Pleroma.Upload.Filter.Mogrifun, "mogrify"),
|
check_filter(Pleroma.Upload.Filter.Mogrifun, "mogrify"),
|
||||||
check_filter(Pleroma.Upload.Filter.AnalyzeMetadata, "mogrify"),
|
check_filter(Pleroma.Upload.Filter.AnalyzeMetadata, "mogrify"),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.BBS.Authenticator do
|
defmodule Pleroma.BBS.Authenticator do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.BBS.Handler do
|
defmodule Pleroma.BBS.Handler do
|
||||||
|
@ -42,8 +42,45 @@ defmodule Pleroma.BBS.Handler do
|
||||||
|
|
||||||
def puts_activity(activity) do
|
def puts_activity(activity) do
|
||||||
status = Pleroma.Web.MastodonAPI.StatusView.render("show.json", %{activity: activity})
|
status = Pleroma.Web.MastodonAPI.StatusView.render("show.json", %{activity: activity})
|
||||||
|
|
||||||
IO.puts("-- #{status.id} by #{status.account.display_name} (#{status.account.acct})")
|
IO.puts("-- #{status.id} by #{status.account.display_name} (#{status.account.acct})")
|
||||||
IO.puts(HTML.strip_tags(status.content))
|
|
||||||
|
status.content
|
||||||
|
|> String.split("<br/>")
|
||||||
|
|> Enum.map(&HTML.strip_tags/1)
|
||||||
|
|> Enum.map(&HtmlEntities.decode/1)
|
||||||
|
|> Enum.map(&IO.puts/1)
|
||||||
|
end
|
||||||
|
|
||||||
|
def puts_notification(activity, user) do
|
||||||
|
notification =
|
||||||
|
Pleroma.Web.MastodonAPI.NotificationView.render("show.json", %{
|
||||||
|
notification: activity,
|
||||||
|
for: user
|
||||||
|
})
|
||||||
|
|
||||||
|
IO.puts(
|
||||||
|
"== (#{notification.type}) #{notification.status.id} by #{notification.account.display_name} (#{notification.account.acct})"
|
||||||
|
)
|
||||||
|
|
||||||
|
notification.status.content
|
||||||
|
|> String.split("<br/>")
|
||||||
|
|> Enum.map(&HTML.strip_tags/1)
|
||||||
|
|> Enum.map(&HtmlEntities.decode/1)
|
||||||
|
|> (fn x ->
|
||||||
|
case x do
|
||||||
|
[content] ->
|
||||||
|
"> " <> content
|
||||||
|
|
||||||
|
[head | _tail] ->
|
||||||
|
# "> " <> hd <> "..."
|
||||||
|
head
|
||||||
|
|> String.slice(1, 80)
|
||||||
|
|> (fn x -> "> " <> x <> "..." end).()
|
||||||
|
end
|
||||||
|
end).()
|
||||||
|
|> IO.puts()
|
||||||
|
|
||||||
IO.puts("")
|
IO.puts("")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -53,6 +90,11 @@ defmodule Pleroma.BBS.Handler do
|
||||||
IO.puts("home - Show the home timeline")
|
IO.puts("home - Show the home timeline")
|
||||||
IO.puts("p <text> - Post the given text")
|
IO.puts("p <text> - Post the given text")
|
||||||
IO.puts("r <id> <text> - Reply to the post with the given id")
|
IO.puts("r <id> <text> - Reply to the post with the given id")
|
||||||
|
IO.puts("t <id> - Show a thread from the given id")
|
||||||
|
IO.puts("n - Show notifications")
|
||||||
|
IO.puts("n read - Mark all notifactions as read")
|
||||||
|
IO.puts("f <id> - Favourites the post with the given id")
|
||||||
|
IO.puts("R <id> - Repeat the post with the given id")
|
||||||
IO.puts("quit - Quit")
|
IO.puts("quit - Quit")
|
||||||
|
|
||||||
state
|
state
|
||||||
|
@ -73,11 +115,53 @@ defmodule Pleroma.BBS.Handler do
|
||||||
state
|
state
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def handle_command(%{user: user} = state, "t " <> activity_id) do
|
||||||
|
with %Activity{} = activity <- Activity.get_by_id(activity_id) do
|
||||||
|
activities =
|
||||||
|
ActivityPub.fetch_activities_for_context(activity.data["context"], %{
|
||||||
|
blocking_user: user,
|
||||||
|
user: user,
|
||||||
|
exclude_id: activity.id
|
||||||
|
})
|
||||||
|
|
||||||
|
case activities do
|
||||||
|
[] ->
|
||||||
|
activity_id
|
||||||
|
|> Activity.get_by_id()
|
||||||
|
|> puts_activity()
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
activities
|
||||||
|
|> Enum.reverse()
|
||||||
|
|> Enum.each(&puts_activity/1)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
_e -> IO.puts("Could not show this thread...")
|
||||||
|
end
|
||||||
|
|
||||||
|
state
|
||||||
|
end
|
||||||
|
|
||||||
|
def handle_command(%{user: user} = state, "n read") do
|
||||||
|
Pleroma.Notification.clear(user)
|
||||||
|
IO.puts("All notifications were marked as read")
|
||||||
|
|
||||||
|
state
|
||||||
|
end
|
||||||
|
|
||||||
|
def handle_command(%{user: user} = state, "n") do
|
||||||
|
user
|
||||||
|
|> Pleroma.Web.MastodonAPI.MastodonAPI.get_notifications(%{})
|
||||||
|
|> Enum.each(&puts_notification(&1, user))
|
||||||
|
|
||||||
|
state
|
||||||
|
end
|
||||||
|
|
||||||
def handle_command(%{user: user} = state, "p " <> text) do
|
def handle_command(%{user: user} = state, "p " <> text) do
|
||||||
text = String.trim(text)
|
text = String.trim(text)
|
||||||
|
|
||||||
with {:ok, _activity} <- CommonAPI.post(user, %{status: text}) do
|
with {:ok, activity} <- CommonAPI.post(user, %{status: text}) do
|
||||||
IO.puts("Posted!")
|
IO.puts("Posted! ID: #{activity.id}")
|
||||||
else
|
else
|
||||||
_e -> IO.puts("Could not post...")
|
_e -> IO.puts("Could not post...")
|
||||||
end
|
end
|
||||||
|
@ -85,6 +169,19 @@ defmodule Pleroma.BBS.Handler do
|
||||||
state
|
state
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def handle_command(%{user: user} = state, "f " <> id) do
|
||||||
|
id = String.trim(id)
|
||||||
|
|
||||||
|
with %Activity{} = activity <- Activity.get_by_id(id),
|
||||||
|
{:ok, _activity} <- CommonAPI.favorite(user, activity) do
|
||||||
|
IO.puts("Favourited!")
|
||||||
|
else
|
||||||
|
_e -> IO.puts("Could not Favourite...")
|
||||||
|
end
|
||||||
|
|
||||||
|
state
|
||||||
|
end
|
||||||
|
|
||||||
def handle_command(state, "home") do
|
def handle_command(state, "home") do
|
||||||
user = state.user
|
user = state.user
|
||||||
|
|
||||||
|
@ -123,7 +220,7 @@ defmodule Pleroma.BBS.Handler do
|
||||||
|
|
||||||
loop(%{state | counter: state.counter + 1})
|
loop(%{state | counter: state.counter + 1})
|
||||||
|
|
||||||
{:error, :interrupted} ->
|
{:input, ^input, {:error, :interrupted}} ->
|
||||||
IO.puts("Caught Ctrl+C...")
|
IO.puts("Caught Ctrl+C...")
|
||||||
loop(%{state | counter: state.counter + 1})
|
loop(%{state | counter: state.counter + 1})
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Bookmark do
|
defmodule Pleroma.Bookmark do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Caching do
|
defmodule Pleroma.Caching do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Captcha do
|
defmodule Pleroma.Captcha do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Captcha.Kocaptcha do
|
defmodule Pleroma.Captcha.Kocaptcha do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Captcha.Native do
|
defmodule Pleroma.Captcha.Native do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Captcha.Service do
|
defmodule Pleroma.Captcha.Service do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Chat do
|
defmodule Pleroma.Chat do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Chat.MessageReference do
|
defmodule Pleroma.Chat.MessageReference do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Clippy do
|
defmodule Pleroma.Clippy do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config do
|
defmodule Pleroma.Config do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.DeprecationWarnings do
|
defmodule Pleroma.Config.DeprecationWarnings do
|
||||||
|
@ -20,6 +20,43 @@ defmodule Pleroma.Config.DeprecationWarnings do
|
||||||
"\n* `config :pleroma, :instance, mrf_transparency_exclusions` is now `config :pleroma, :mrf, transparency_exclusions`"}
|
"\n* `config :pleroma, :instance, mrf_transparency_exclusions` is now `config :pleroma, :mrf, transparency_exclusions`"}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def check_exiftool_filter do
|
||||||
|
filters = Config.get([Pleroma.Upload]) |> Keyword.get(:filters, [])
|
||||||
|
|
||||||
|
if Pleroma.Upload.Filter.Exiftool in filters do
|
||||||
|
Logger.warn("""
|
||||||
|
!!!DEPRECATION WARNING!!!
|
||||||
|
Your config is using Exiftool as a filter instead of Exiftool.StripLocation. This should work for now, but you are advised to change to the new configuration to prevent possible issues later:
|
||||||
|
|
||||||
|
```
|
||||||
|
config :pleroma, Pleroma.Upload,
|
||||||
|
filters: [Pleroma.Upload.Filter.Exiftool]
|
||||||
|
```
|
||||||
|
|
||||||
|
Is now
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
config :pleroma, Pleroma.Upload,
|
||||||
|
filters: [Pleroma.Upload.Filter.Exiftool.StripLocation]
|
||||||
|
```
|
||||||
|
""")
|
||||||
|
|
||||||
|
new_config =
|
||||||
|
filters
|
||||||
|
|> Enum.map(fn
|
||||||
|
Pleroma.Upload.Filter.Exiftool -> Pleroma.Upload.Filter.Exiftool.StripLocation
|
||||||
|
filter -> filter
|
||||||
|
end)
|
||||||
|
|
||||||
|
Config.put([Pleroma.Upload, :filters], new_config)
|
||||||
|
|
||||||
|
:error
|
||||||
|
else
|
||||||
|
:ok
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def check_simple_policy_tuples do
|
def check_simple_policy_tuples do
|
||||||
has_strings =
|
has_strings =
|
||||||
Config.get([:mrf_simple])
|
Config.get([:mrf_simple])
|
||||||
|
@ -180,7 +217,8 @@ defmodule Pleroma.Config.DeprecationWarnings do
|
||||||
check_old_chat_shoutbox(),
|
check_old_chat_shoutbox(),
|
||||||
check_quarantined_instances_tuples(),
|
check_quarantined_instances_tuples(),
|
||||||
check_transparency_exclusions_tuples(),
|
check_transparency_exclusions_tuples(),
|
||||||
check_simple_policy_tuples()
|
check_simple_policy_tuples(),
|
||||||
|
check_exiftool_filter()
|
||||||
]
|
]
|
||||||
|> Enum.reduce(:ok, fn
|
|> Enum.reduce(:ok, fn
|
||||||
:ok, :ok -> :ok
|
:ok, :ok -> :ok
|
||||||
|
@ -273,7 +311,7 @@ defmodule Pleroma.Config.DeprecationWarnings do
|
||||||
|
|
||||||
warning_preface = """
|
warning_preface = """
|
||||||
!!!DEPRECATION WARNING!!!
|
!!!DEPRECATION WARNING!!!
|
||||||
Your config is using old setting name `timeout` instead of `recv_timeout` in pool settings. Setting should work for now, but you are advised to change format to scheme with port to prevent possible issues later.
|
Your config is using old setting name `timeout` instead of `recv_timeout` in pool settings. The setting will not take effect until updated.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
updated_config =
|
updated_config =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.Getting do
|
defmodule Pleroma.Config.Getting do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.Helpers do
|
defmodule Pleroma.Config.Helpers do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.Holder do
|
defmodule Pleroma.Config.Holder do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.Loader do
|
defmodule Pleroma.Config.Loader do
|
||||||
|
@ -19,21 +19,10 @@ defmodule Pleroma.Config.Loader do
|
||||||
:tesla
|
:tesla
|
||||||
]
|
]
|
||||||
|
|
||||||
if Code.ensure_loaded?(Config.Reader) do
|
@reader Config.Reader
|
||||||
@reader Config.Reader
|
|
||||||
|
|
||||||
def read(path), do: @reader.read!(path)
|
|
||||||
else
|
|
||||||
# support for Elixir less than 1.9
|
|
||||||
@reader Mix.Config
|
|
||||||
def read(path) do
|
|
||||||
path
|
|
||||||
|> @reader.eval!()
|
|
||||||
|> elem(0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@spec read(Path.t()) :: keyword()
|
@spec read(Path.t()) :: keyword()
|
||||||
|
def read(path), do: @reader.read!(path)
|
||||||
|
|
||||||
@spec merge(keyword(), keyword()) :: keyword()
|
@spec merge(keyword(), keyword()) :: keyword()
|
||||||
def merge(c1, c2), do: @reader.merge(c1, c2)
|
def merge(c1, c2), do: @reader.merge(c1, c2)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.Oban do
|
defmodule Pleroma.Config.Oban do
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.ReleaseRuntimeProvider do
|
defmodule Pleroma.Config.ReleaseRuntimeProvider do
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
Imports runtime config and `{env}.exported_from_db.secret.exs` for releases.
|
Imports runtime config and `{env}.exported_from_db.secret.exs` for releases.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Config.TransferTask do
|
defmodule Pleroma.Config.TransferTask do
|
||||||
|
@ -47,7 +47,7 @@ defmodule Pleroma.Config.TransferTask do
|
||||||
{logger, other} =
|
{logger, other} =
|
||||||
(Repo.all(ConfigDB) ++ deleted_settings)
|
(Repo.all(ConfigDB) ++ deleted_settings)
|
||||||
|> Enum.map(&merge_with_default/1)
|
|> Enum.map(&merge_with_default/1)
|
||||||
|> Enum.split_with(fn {group, _, _, _} -> group in [:logger, :quack] end)
|
|> Enum.split_with(fn {group, _, _, _} -> group in [:logger] end)
|
||||||
|
|
||||||
logger
|
logger
|
||||||
|> Enum.sort()
|
|> Enum.sort()
|
||||||
|
@ -104,11 +104,6 @@ defmodule Pleroma.Config.TransferTask do
|
||||||
end
|
end
|
||||||
|
|
||||||
# change logger configuration in runtime, without restart
|
# change logger configuration in runtime, without restart
|
||||||
defp configure({:quack, key, _, merged}) do
|
|
||||||
Logger.configure_backend(Quack.Logger, [{key, merged}])
|
|
||||||
:ok = update_env(:quack, key, merged)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp configure({_, :backends, _, merged}) do
|
defp configure({_, :backends, _, merged}) do
|
||||||
# removing current backends
|
# removing current backends
|
||||||
Enum.each(Application.get_env(:logger, :backends), &Logger.remove_backend/1)
|
Enum.each(Application.get_env(:logger, :backends), &Logger.remove_backend/1)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.ConfigDB do
|
defmodule Pleroma.ConfigDB do
|
||||||
|
@ -163,7 +163,6 @@ defmodule Pleroma.ConfigDB do
|
||||||
defp only_full_update?(%ConfigDB{group: group, key: key}) do
|
defp only_full_update?(%ConfigDB{group: group, key: key}) do
|
||||||
full_key_update = [
|
full_key_update = [
|
||||||
{:pleroma, :ecto_repos},
|
{:pleroma, :ecto_repos},
|
||||||
{:quack, :meta},
|
|
||||||
{:mime, :types},
|
{:mime, :types},
|
||||||
{:cors_plug, [:max_age, :methods, :expose, :headers]},
|
{:cors_plug, [:max_age, :methods, :expose, :headers]},
|
||||||
{:swarm, :node_blacklist},
|
{:swarm, :node_blacklist},
|
||||||
|
@ -386,7 +385,7 @@ defmodule Pleroma.ConfigDB do
|
||||||
|
|
||||||
@spec module_name?(String.t()) :: boolean()
|
@spec module_name?(String.t()) :: boolean()
|
||||||
def module_name?(string) do
|
def module_name?(string) do
|
||||||
Regex.match?(~r/^(Pleroma|Phoenix|Tesla|Quack|Ueberauth|Swoosh)\./, string) or
|
Regex.match?(~r/^(Pleroma|Phoenix|Tesla|Ueberauth|Swoosh)\./, string) or
|
||||||
string in ["Oban", "Ueberauth", "ExSyslogger", "ConcurrentLimiter"]
|
string in ["Oban", "Ueberauth", "ExSyslogger", "ConcurrentLimiter"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Constants do
|
defmodule Pleroma.Constants do
|
||||||
|
@ -27,4 +27,46 @@ defmodule Pleroma.Constants do
|
||||||
do:
|
do:
|
||||||
~w(index.html robots.txt static static-fe finmoji emoji packs sounds images instance sw.js sw-pleroma.js favicon.png schemas doc embed.js embed.css)
|
~w(index.html robots.txt static static-fe finmoji emoji packs sounds images instance sw.js sw-pleroma.js favicon.png schemas doc embed.js embed.css)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const(status_updatable_fields,
|
||||||
|
do: [
|
||||||
|
"source",
|
||||||
|
"tag",
|
||||||
|
"updated",
|
||||||
|
"emoji",
|
||||||
|
"content",
|
||||||
|
"summary",
|
||||||
|
"sensitive",
|
||||||
|
"attachment",
|
||||||
|
"generator"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
const(updatable_object_types,
|
||||||
|
do: [
|
||||||
|
"Note",
|
||||||
|
"Question",
|
||||||
|
"Audio",
|
||||||
|
"Video",
|
||||||
|
"Event",
|
||||||
|
"Article",
|
||||||
|
"Page"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
const(actor_types,
|
||||||
|
do: [
|
||||||
|
"Application",
|
||||||
|
"Group",
|
||||||
|
"Organization",
|
||||||
|
"Person",
|
||||||
|
"Service"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# basic regex, just there to weed out potential mistakes
|
||||||
|
# https://datatracker.ietf.org/doc/html/rfc2045#section-5.1
|
||||||
|
const(mime_regex,
|
||||||
|
do: ~r/^[^[:cntrl:] ()<>@,;:\\"\/\[\]?=]+\/[^[:cntrl:] ()<>@,;:\\"\/\[\]?=]+(; .*)?$/
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Conversation do
|
defmodule Pleroma.Conversation do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Conversation.Participation do
|
defmodule Pleroma.Conversation.Participation do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Conversation.Participation.RecipientShip do
|
defmodule Pleroma.Conversation.Participation.RecipientShip do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.CounterCache do
|
defmodule Pleroma.CounterCache do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.DataMigration do
|
defmodule Pleroma.DataMigration do
|
||||||
|
@ -42,4 +42,5 @@ defmodule Pleroma.DataMigration do
|
||||||
end
|
end
|
||||||
|
|
||||||
def populate_hashtags_table, do: get_by_name("populate_hashtags_table")
|
def populate_hashtags_table, do: get_by_name("populate_hashtags_table")
|
||||||
|
def delete_context_objects, do: get_by_name("delete_context_objects")
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Delivery do
|
defmodule Pleroma.Delivery do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Docs.Generator do
|
defmodule Pleroma.Docs.Generator do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Docs.JSON do
|
defmodule Pleroma.Docs.JSON do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Docs.Markdown do
|
defmodule Pleroma.Docs.Markdown do
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue