1
0
Fork 0
mirror of https://git.pleroma.social/pleroma/pleroma.git synced 2026-02-15 17:16:57 +00:00
Commit graph

17615 commits

Author SHA1 Message Date
Phantasm
7d2518a9ae
Elixir 1.19: Fix typing violation on struct updates in Web.ApiSpec.Cast*
warning: a struct for Plug.Conn is expected on struct update:

         %Plug.Conn{conn | query_params: query_params}

     but got type:

         dynamic()

     where "conn" was given the type:

         # type: dynamic()
         # from: lib/pleroma/web/api_spec/cast_and_validate.ex:109:43
         conn

     when defining the variable "conn", you must also pattern match on "%Plug.Conn{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 133 │         conn = %Conn{conn | query_params: query_params}
     │                ~
     │
     └─ lib/pleroma/web/api_spec/cast_and_validate.ex:133:16: Pleroma.Web.ApiSpec.CastAndValidate.cast_and_validate/6
2026-02-12 23:44:27 +01:00
Phantasm
40f4f1a99f
Elixir 1.19: Fix typing violation on struct updates in Pleroma.Upload
warning: a struct for Pleroma.Upload is expected on struct update:

        %Pleroma.Upload{
          upload
          | path:
              case upload.path do
                x when x === false or x === nil ->
                  <<to_string(upload.id)::binary, "/", to_string(upload.name)::binary>>

                x ->
                  x
              end
        }

    but got type:

        dynamic()

    where "upload" was given the type:

        # type: dynamic()
        # from: lib/pleroma/upload.ex:95:24
        {:ok, upload} <- prepare_upload(upload, opts)

    when defining the variable "upload", you must also pattern match on "%Pleroma.Upload{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 96 │          upload = %__MODULE__{upload | path: upload.path || "#{upload.id}/#{upload.name}"},
    │                   ~
    │
    └─ lib/pleroma/upload.ex:96:19: Pleroma.Upload.store/2
2026-02-12 23:44:26 +01:00
Phantasm
d36e9c8a0d
Elixir 1.19: Fix typing violation on struct updates in MFA.Changeset
warning: a struct for Pleroma.MFA.Settings is expected on struct update:

        %Pleroma.MFA.Settings{settings | enabled: false}

    but got type:

        dynamic()

    where "settings" was given the type:

        # type: dynamic()
        # from: lib/pleroma/mfa/changeset.ex:11:14
        settings = Pleroma.MFA.fetch_settings(Ecto.Changeset.apply_changes(changeset))

    when defining the variable "settings", you must also pattern match on "%Pleroma.MFA.Settings{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 17 │       put_change(changeset, %Settings{settings | enabled: false})
    │                             ~
    │
    └─ lib/pleroma/mfa/changeset.ex:17:29: Pleroma.MFA.Changeset.disable/2

---

    warning: a struct for Pleroma.MFA.Settings is expected on struct update:

        %Pleroma.MFA.Settings{
          settings
          | totp: %Pleroma.MFA.Settings.TOTP{confirmed: false, delivery_type: "app", secret: nil}
        }

    but got type:

        dynamic()

    where "settings" was given the type:

        # type: dynamic()
        # from: lib/pleroma/mfa/changeset.ex:23:74
        %Pleroma.User{multi_factor_authentication_settings: settings} = user

    when defining the variable "settings", you must also pattern match on "%Pleroma.MFA.Settings{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 25 │     |> put_change(%Settings{settings | totp: %Settings.TOTP{}})
    │                   ~
    │
    └─ lib/pleroma/mfa/changeset.ex:25:19: Pleroma.MFA.Changeset.disable_totp/1
2026-02-12 23:44:26 +01:00
Phantasm
6279907754
Elixir 1.19: Fix typing violation on struct updates in Pleroma.Marker
warning: a struct for Pleroma.Marker is expected on struct update:

        %Pleroma.Marker{marker | user: user}

    but got type:

        dynamic()

    where "marker" was given the type:

        # type: dynamic()
        # from: lib/pleroma/marker.ex
        {:ok, marker}

    when defining the variable "marker", you must also pattern match on "%Pleroma.Marker{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 81 │       {:ok, marker} -> %__MODULE__{marker | user: user}
    │                        ~
    │
    └─ lib/pleroma/marker.ex:81:24: Pleroma.Marker.get_marker/2
2026-02-12 23:44:26 +01:00
feld
1c685ea41a Update README.md
fix logo
2026-02-12 00:34:08 +00:00
lain
ec6ffa4fdf Merge pull request 'CI: Add basic woodpecker file' (#7816) from woodpecker-ci into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7816
2026-02-09 17:46:19 +00:00
Lain Soykaf
4693dc837b CI: Only run on PR 2026-02-09 10:13:29 +04:00
Lain Soykaf
feda4d0718 CI: Add basic woodpecker file 2026-02-09 09:01:16 +04:00
nicole mikołajczyk
cb78699a3b Merge branch 'instance-profile-fields' into 'develop'
Add /api/v2/instance profile fields limits info used by Mastodon

See merge request pleroma/pleroma!4434
2026-01-30 23:04:49 +01:00
nicole mikołajczyk
833e9829ba Merge branch 'relationship-expires-at' into 'develop'
MastoAPI AccountView: Add mute/block expiry to the relationship object (simplified)

See merge request pleroma/pleroma!4433
2026-01-30 07:08:21 +01:00
nicole mikołajczyk
bd30d461b0 Add /api/v2/instance profile fields limits info used by Mastodon
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-30 07:05:45 +01:00
nicole mikołajczyk
5001fb3a78 Update changelog
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-28 14:02:55 +01:00
nicole mikołajczyk
bc0c7fb310 Fix tests, relationship should always define _expires_at
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-28 13:58:33 +01:00
Phantasm
c1e33bfadb MastoAPI AccountView AccountController: Add more block/mute expiry tests 2026-01-28 13:50:34 +01:00
Phantasm
e7a4d5ea66 MastoAPI AccountView: Add mute/block expiry to the relationship key 2026-01-28 13:50:23 +01:00
nicole mikołajczyk
6fac6ff7f1 MastoAPI AccountView: Add mute/block expiry to the relationship object
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-28 13:49:34 +01:00
nicole mikołajczyk
055242f438 Merge branch 'assign-users' into 'develop'
Allow assigning users to reports

See merge request pleroma/pleroma!3670
2026-01-28 11:22:09 +01:00
nicole mikołajczyk
80ede85f75 Allow assigning users to reports
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-28 10:35:19 +01:00
lain
d6bec8b6b7 Merge branch 'delete-outdated-docs' into 'develop'
Docs: Remove outdated, incorrect, inappropriate or unmaintained install docs

See merge request pleroma/pleroma!4432
2026-01-25 05:46:31 +00:00
Phantasm
54092d2b7c Docs: Remove outdated, incorrect, inappropriate or unmaintained install docs 2026-01-25 05:46:28 +00:00
lain
a7a3978a20 Merge branch 'revert-d6888e24' into 'develop'
Update Hackney, fix redirect issues

See merge request pleroma/pleroma!4412
2026-01-17 11:09:27 +00:00
Lain Soykaf
e7d2d9bd89 mrf(media_proxy_warming): avoid adapter-level redirects
Drop follow_redirect/force_redirect from the HTTP options used when warming MediaProxy, relying on Tesla middleware instead (Hackney redirect handling can crash behind CONNECT proxies).

Also add a regression assertion in the policy test and document the upstream Hackney issues in ReverseProxy redirect handling.
2026-01-17 02:24:07 +04:00
Lain Soykaf
346014b897 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into revert-d6888e24 2026-01-16 22:43:10 +04:00
Lain Soykaf
1a6a8f6fb4 test(http): cover reverse proxy redirects via CONNECT proxy
Exercises Pleroma.ReverseProxy.Client.Hackney with follow_redirect enabled behind an HTTPS CONNECT proxy, ensuring the client follows a relative redirect and can stream the final body.
2026-01-16 22:14:27 +04:00
Mark Felder
9b1941366f In-house redirect handler for mediaproxy with Hackney adapter
Also ensure we always pass an absolute URL to Hackney when parsing a redirect response

(cherry picked from commit 00ac6bce8d)
2026-01-16 22:14:27 +04:00
Lain Soykaf
e67b4cd8b2 test(http): reproduce hackney follow_redirect crash via CONNECT proxy
Hackney 1.25 crashes when follow_redirect is enabled behind an HTTPS CONNECT proxy and the Location header is relative (hackney_http_connect transport).
This test demonstrates the failure and verifies Tesla-level redirects work when hackney redirects are disabled.
2026-01-16 21:17:40 +04:00
Lain Soykaf
52fc344b0a test(http): cover pooled redirect with hackney
Reproduces the Hackney 1.25 pooled redirect cleanup issue which can surface as :req_not_found when the adapter returns a Ref and the body is later fetched.
2026-01-16 21:17:40 +04:00
Lain Soykaf
ef0f04ca48 http(hackney): disable adapter redirects by default
Hackney 1.25.x has redirect handling issues behind CONNECT proxies and with pools.
Disable hackney-level redirects and rely on Tesla.Middleware.FollowRedirects instead.
Also default to with_body: true so redirects can be followed reliably.
2026-01-16 21:17:40 +04:00
lain
c920241c04 Merge branch 'instance-domain-blocks' into 'develop'
Add v1/instance/domain_blocks endpoint

See merge request pleroma/pleroma!4353
2026-01-16 13:30:33 +00:00
Lain Soykaf
e91bb2144d InstanceView: Omit comment if it's empty 2026-01-16 16:17:21 +04:00
Lain Soykaf
656c4368d3 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-instance-domain-blocks 2026-01-16 14:24:14 +04:00
lain
09aad75b33 Merge branch 'fix-oauth-app-registration' into 'develop'
Change redirect_uris to accept array of strings

See merge request pleroma/pleroma!4423
2026-01-16 10:21:41 +00:00
Lain Soykaf
4df7f93a23 Fix OAuth registration redirect_uris array support 2026-01-16 12:10:21 +04:00
lain
6001ed39fa Merge branch 'vix-0.36.0' into 'develop'
mix: upgrade vix from `~> 0.26.0` to `~> 0.36`

Closes #3393

See merge request pleroma/pleroma!4424
2026-01-14 06:48:00 +00:00
Haelwenn (lanodan) Monnier
05704ec86e
mix: upgrade vix from "~> 0.26.0" to "~> 0.36"
Dropping the last zero should allow to get 0.x updates rather
than only 0.36.x updates.

Fixes: https://git.pleroma.social/pleroma/pleroma/-/issues/3393
2026-01-14 03:11:37 +01:00
MediaFormat
12002830bc fix tests 2026-01-11 17:47:27 +00:00
lain
9fcf918e1c Merge branch 'phnt/oban-web' into 'develop'
Add Oban Web and upgrade LiveView, plug

See merge request pleroma/pleroma!4422
2026-01-11 05:40:47 +00:00
lain
c945a8a467 Merge branch 'less-flaky-tests' into 'develop'
Less flaky tests

See merge request pleroma/pleroma!4421
2026-01-11 05:38:17 +00:00
MediaFormat
87f3459f8c fix field type, fix formatting 2026-01-11 05:34:17 +00:00
MediaFormat
7da1d429a2 add changelog.d entry 2026-01-11 01:15:55 +00:00
MediaFormat
aa95855a7f Change redirect_uris to accept array of strings 2026-01-11 01:12:42 +00:00
Phantasm
5e114931f5
Move LiveDashboard to /pleroma/live_dashboard 2026-01-09 11:55:16 +01:00
Phantasm
39279292b2
Docs: Add admin documentation for LiveDashboard and Oban Web 2026-01-08 22:23:38 +01:00
Haelwenn
792d473778 Merge branch 'paginate-follow-requests' into 'develop'
Paginate follow requests (adapted from Akkoma)

See merge request pleroma/pleroma!4420
2026-01-08 10:25:45 +00:00
Lain Soykaf
4984aaa183 Streamer: Fix Marker streaming bug, fix caching in tests. 2026-01-08 14:06:24 +04:00
Lain Soykaf
0b498833cd Add changelog 2026-01-08 13:40:51 +04:00
Lain Soykaf
07b0e6c1dc Mix: Silence migrations 2026-01-08 13:40:43 +04:00
Lain Soykaf
3ecc861fa7 StripLocation, ReadDescription: Silence noisy errors. 2026-01-08 13:40:25 +04:00
Lain Soykaf
100cfe4db8 Config: Make streaming in tests actually synchronous 2026-01-08 13:39:55 +04:00
Phantasm
619ff5b9e3
Remove /pleroma/oban and /phoenix/live_dashboard from API routes
This is needed to prevent admin frontend overrides from misbehaving when
overriding AdminFE located at /pleroma/admin, since API routes are
interpreted as the first portion of their full path, ie:
/api/v1/pleroma/admin -> /api
2026-01-08 00:33:18 +01:00