Commit graph

15026 commits

Author SHA1 Message Date
FloatingGhost
153539a246 add changelog entry 2023-01-15 19:02:58 +00:00
FloatingGhost
d394ab0a8a Merge branch 'develop' of akkoma.dev:AkkomaGang/akkoma into develop 2023-01-15 18:58:26 +00:00
FloatingGhost
90088cce11 Support TLD wildcards in MRF matches
Fixes #431
2023-01-15 18:57:49 +00:00
floatingghost
63ce25f32c Merge pull request 'Correct og:description tag in static-fe' (#373) from sfr/akkoma:fix/og-description into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/373
2023-01-15 18:15:20 +00:00
sfr
20cd8a0fc4 URL encode remote emoji pack names (#362)
fix #246

Co-authored-by: Sol Fisher Romanoff <sol@solfisher.com>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/362
Co-authored-by: sfr <sol@solfisher.com>
Co-committed-by: sfr <sol@solfisher.com>
2023-01-15 18:14:04 +00:00
floatingghost
0fb2042f2c Merge pull request 'Remove refences to ARM OTP builds in install guide' (#432) from norm/akkoma:remove-arm-otp into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/432
2023-01-15 18:11:53 +00:00
floatingghost
0c8da6466e Merge pull request 'Update OpenBSD docs' (#414) from lechindianer/akkoma:update-openbsd-docs into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/414
2023-01-15 18:09:32 +00:00
floatingghost
975bc6d7e8 Merge pull request 'fix: Give error message to users when address has already been validated' (#435) from cheerfulstoic/akkoma:develop into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/435
2023-01-15 18:06:12 +00:00
FloatingGhost
2fc5fb7f5a Add changelog entry 2023-01-15 18:05:02 +00:00
FloatingGhost
f3c118ca23 Mix format 2023-01-15 18:00:03 +00:00
FloatingGhost
0d342a35e3 add contentMap to schema 2023-01-15 17:59:19 +00:00
Brian Underwood
7ca9ce9d67 fix: Give error message to users when address has already been validated
Plus other errors.
2023-01-12 22:08:10 +01:00
FloatingGhost
65e8e8fb6d Merge branch 'language-on-posts' into develop 2023-01-11 15:44:15 +00:00
FloatingGhost
ff5793198f add inbound language test 2023-01-11 15:42:13 +00:00
FloatingGhost
78c44f31ca fix no-language-specified federation 2023-01-11 15:25:34 +00:00
floatingghost
260c87006e revert ae54c06bb4
revert Language code on mastoapi statuses (#433)

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/433
2023-01-10 15:00:47 +00:00
floatingghost
ae54c06bb4 Language code on mastoapi statuses (#433)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/433
2023-01-10 13:45:43 +00:00
FloatingGhost
22068f0853 fix unused variable warnings 2023-01-10 10:58:17 +00:00
FloatingGhost
7eebaa7a18 bump mock 2023-01-10 10:48:14 +00:00
FloatingGhost
cc63a89b5d Fix tests 2023-01-10 10:29:17 +00:00
FloatingGhost
f86bf16430 Add language support on /api/v1/statuses 2023-01-10 10:29:17 +00:00
floatingghost
6965a2f163 Merge pull request 'use postgres 15 in CI' (#411) from ci-postgres-15 into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/411
2023-01-09 22:16:43 +00:00
ilja
7695010268 Prune Objects --keep-threads option (#350)
This adds an option to the prune_objects mix task.
The original way deleted all non-local public posts older than a certain time frame.
Here we add a different query which you can call using the option --keep-threads.

We query from the activities table all context id's where
    1. the newest activity with this context is still old
    2. none of the activities with this context is is local
    3. none of the activities with this context is bookmarked
and delete all objects with these contexts.

The idea is that posts with local activities (posts, replies, likes, repeats...) may be interesting to keep.
Besides that, a post lives in a certain context (the thread), so we keep the whole thread as well.

Caveats:
* ~~Quotes have a different context. Therefore, when someone quotes a post, it's possible the quoted post will still be deleted.~~ fixed in https://akkoma.dev/AkkomaGang/akkoma/pulls/379
* Although undocumented (in docs/docs/administration/CLI_tasks/database.md/#prune-old-remote-posts-from-the-database), the 'normal' delete action still kept old remote non-public posts. I added an option to keep this behaviour, but this also means that you now have to explicitly provide that option. **This could be considered a breaking change!**
* ~~Note that this removes from the objects table, but not from the activities.~~ See https://akkoma.dev/AkkomaGang/akkoma/pulls/427 for that.

Some statistics from explain analyse:
(cost=1402845.92..1933782.00 rows=3810907 width=62) (actual time=2562455.486..2562455.495 rows=0 loops=1)
 Planning Time: 505.327 ms
 Trigger for constraint chat_message_references_object_id_fkey: time=651939.797 calls=921740
 Trigger for constraint deliveries_object_id_fkey: time=52036.009 calls=921740
 Trigger for constraint hashtags_objects_object_id_fkey: time=20665.778 calls=921740
 Execution Time: 3287933.902 ms

***
**TODO**
1. [x] **Question:** Is it OK to keep it like this in regard to quote posts? If not (ie post quoted by local users should also be kept), should we give quotes the same context as the post they are quoting? (If we don't want to give them the same context, I'll have to see how/if I can do it without being too costly)
    * See https://akkoma.dev/AkkomaGang/akkoma/pulls/379
2. [x] **Question:** the "original" query only deletes public posts (this is undocumented, but you can check the code). This new one doesn't care for scope. From the docs I get that the idea is that posts can be refetched when needed. But I have from a trusted source that Pleroma can't refetch non-public posts. I assume that's the reason why they are kept here. I see different options to deal with this
    1. ~~We keep it as currently implemented and just don't care about scope with this option~~
    2. ~~We add logic to not delete non-public posts either (I'll have to see how costly that becomes)~~
    3. We add an extra --keep-non-public parameter. This is technically speaking breakage (you didn't have to provide a param before for this, now you do), but I'm inclined to not care much because it wasn't documented nor tested in the first place.
3. [x] See if we can do the query using Elixir
4. [x] Test on a bigger DB to see that we don't run into a timeout
5. [x] Add docs

Co-authored-by: ilja <git@ilja.space>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/350
Co-authored-by: ilja <akkoma.dev@ilja.space>
Co-committed-by: ilja <akkoma.dev@ilja.space>
2023-01-09 22:15:41 +00:00
floatingghost
357f80a714 Merge pull request 'Changed references of "Pleroma" to "Akkoma" in email text' (#428) from knova/akkoma:develop into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/428
2023-01-09 22:13:45 +00:00
darkkirb
a8cd859ef9 Use actual ISO8601 timestamps for masto API (#425)
Some users post posts with spoofed timestamp, and some clients will have issues with certain dates. Tusky for example crashes if the date is any sooner than 1 BCE (“year zero” in the representation).

I limited the range of what is considered a valid date to be somewhere between the years 1583 and 9999 (inclusive).

The numbers have been chosen because:

- ISO 8601 only allows years before 1583 with “mutual agreement”
- Years after 9999 could cause issues with certain clients as well

Co-authored-by: Charlotte 🦝 Delenk <lotte@chir.rs>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/425
Co-authored-by: darkkirb <lotte@chir.rs>
Co-committed-by: darkkirb <lotte@chir.rs>
2023-01-09 22:12:28 +00:00
floatingghost
0d56adc16b Merge pull request 'exiftool doesn’t support JPEG XL either' (#426) from darkkirb/akkoma:exiftools-no-jxl into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/426
2023-01-09 22:10:54 +00:00
Norm
eb55472450 Remove refences to ARM OTP builds in install guide
Akkoma currently doesn't provide ARM OTP builds unlike Pleroma, so it's best to update the install guide to reflect that.

Ref: https://akkoma.dev/AkkomaGang/akkoma/issues/424
2023-01-09 20:11:33 +00:00
knova
13d943667e Changed references of "Pleroma" to "Akkoma" in email text
I know this is probably small peanuts in the grand scheme of things, but it bugged me when I was messing around with my own Akkoma instance.
2023-01-08 03:29:09 +00:00
Charlotte 🦝 Delenk
f2b925f32c
exiftool doesn’t support JPEG XL either 2023-01-07 14:49:58 +01:00
ihor
b98fe4476c fix "exiftool not support svg files' (#421)
Faced with this issue today, Pleroma responds with status 400 (Bad request) if Exiftool.StripLocation is added to the list of filter modules for uploads. Here is logs:

```
13:27:25.201 [info] POST /api/v1/media

13:27:25.232 request_id=FzdspaAnrA6cyv0APgVR [error] Elixir.Pleroma.Upload.Filter: Filter Elixir.Pleroma.Upload.Filter.Exiftool.StripLocation failed: {:error, "Elixir.Pleroma.Upload.Filter.Exiftool.StripLocation: %ErlangError{original: :enoent}"}

13:27:25.232 request_id=FzdspaAnrA6cyv0APgVR [error] Elixir.Pleroma.Upload store (using Pleroma.Uploaders.Local) failed: "Elixir.Pleroma.Upload.Filter.Exiftool.StripLocation: %ErlangError{original: :enoent}"
```

# This fix solves this problem.

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/421
Co-authored-by: ihor <ikandreew@gmail.com>
Co-committed-by: ihor <ikandreew@gmail.com>
2023-01-05 15:22:48 +00:00
FloatingGhost
336d06b2a8 Significantly tighten HTTP CSP 2023-01-02 15:21:19 +00:00
Pascal Schmid
eb1b9c4155 Fix PostgreSQL docs
Without creating the directory manually and setting it as user home folder
the commands afterwards won't be executable.
2023-01-02 13:12:54 +01:00
Pascal Schmid
fcce355112 Delete broken config example
httpd won't start with the empty types block.
2023-01-02 13:12:20 +01:00
Pascal Schmid
ef1c68a8e9 Format docs 2023-01-02 13:12:17 +01:00
Pascal Schmid
d427c23e56 Use current package config 2023-01-02 12:56:49 +01:00
Pascal Schmid
769b5969a8 Update referenced OpenBSD version 2023-01-02 12:50:30 +01:00
FloatingGhost
57e51fe62c Migrate Pleroma.Web to phoenix 1.6 formats 2023-01-02 03:29:02 +00:00
FloatingGhost
6a333ade7f Fix task name for robotstxt
Fixes #408
2023-01-01 18:54:08 +00:00
floatingghost
798d13d6e9 Merge pull request 'Use a genserver to periodically fetch metrics' (#413) from prom-leak into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/413
2023-01-01 18:49:05 +00:00
FloatingGhost
6e646c4cbc Use a genserver to periodically fetch metrics
Ref https://github.com/beam-telemetry/telemetry_metrics_prometheus_core/issues/52
2023-01-01 18:32:14 +00:00
FloatingGhost
e03206a9a0 use postgres 15 in CI 2022-12-31 18:29:16 +00:00
floatingghost
6be3383a09 Merge pull request 'Add /api/v1/followed_tags' (#410) from followed-tags into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/410
2022-12-31 18:29:09 +00:00
FloatingGhost
c4b46ca460 Add /api/v1/followed_tags 2022-12-31 18:09:34 +00:00
ilja
745e15468e Use same context for quote posts as the post that's being quoted (#379)
See https://akkoma.dev/AkkomaGang/akkoma/pulls/350#issuecomment-6109

When making quotes through Mast-API, they will now have the same context as the quoted post. This also results in them being showed when fetching the thread. I checked Misskey to see how it's there, and they show the quotes there as well, see e.g. <https://mk.toast.cafe/notes/98u1g0tulg>.

An example from Akkoma:

Co-authored-by: ilja <git@ilja.space>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/379
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
Co-authored-by: ilja <akkoma.dev@ilja.space>
Co-committed-by: ilja <akkoma.dev@ilja.space>
2022-12-31 18:09:27 +00:00
FloatingGhost
b8f280b4b5 Rich media doesn't need to be a map 2022-12-31 03:53:52 +00:00
FloatingGhost
c8f2c4b638 add changelog entry for timeouts 2022-12-31 03:52:52 +00:00
FloatingGhost
bf7ff6a337 Put rich media processing in a Task 2022-12-30 20:11:53 +00:00
Sol Fisher Romanoff
1d884fd914
Correct og:description tag in static-fe 2022-12-30 07:14:54 +02:00
FloatingGhost
5d4c291d52 update references to pleroma in docs 2022-12-30 03:43:35 +00:00
timorl
bca1c43dcb Add docs about emoji stealing (#364)
I managed to steal some emoji, but I had to figure out the specifics the hard way. This should make it easier for future criminals.

Feel free to close if this documentation was omitted on purpose, I can imagine some reasons for why it might have.

Co-authored-by: timorl <timorl@disroot.org>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/364
Co-authored-by: timorl <timorl+akkomadev@disroot.org>
Co-committed-by: timorl <timorl+akkomadev@disroot.org>
2022-12-30 02:58:06 +00:00