Commit graph

17,748 commits

Author SHA1 Message Date
Phantasm
5b6af83e86 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-03-25 11:09:10 -07:00
Phantasm
1b9cd83d88 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-03-25 11:09:05 -07:00
Phantasm
dfaabb48ef 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-03-25 11:08:56 -07:00
nicole mikołajczyk
6bbfba7f6e Merge pull request 'Allow fine-grained announce visibilities (ported from Akkoma)' (#7832) from mkljczk/pleroma:boost-visibilities into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7832
2026-03-21 20:45:30 +00:00
nicole mikołajczyk
23cc812366 Restore embed route
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
Assisted-by: your mother
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-19 15:26:29 +01:00
nicole mikołajczyk
d0ef58a59d Merge pull request 'Normalize Hubzilla alsoKnownAs from string to array' (#7821) from phnt/pleroma:normalize-alsoKnownAs into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7821
2026-03-10 12:05:22 +00:00
nicole mikołajczyk
37cb2f9273 Merge pull request 'Avoid code duplication in UserView' (#7817) from mkljczk/pleroma:user-view-repeat into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7817
2026-03-10 12:04:43 +00:00
nicole mikołajczyk
70de4491c2 Merge pull request 'Support lists exclusive param' (#7831) from mkljczk/pleroma:exclusive-lists into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7831
2026-03-10 12:03:22 +00:00
nicole mikołajczyk
d1787966a6 Merge branch 'develop' into exclusive-lists 2026-03-10 12:03:13 +00:00
Phantasm
a0131ff733
credo: fix ordering of aliases missed in pleroma/pleroma!7841 2026-03-08 21:19:49 +01:00
shibao
bceb28b941 add changelog note for missing static files fix 2026-03-08 11:28:21 +00:00
shibao
4e1ba489ec fix 404s for missing static files 2026-03-08 11:28:21 +00:00
Phantasm
d95d7f6eba Merge pull request 'Gopher: Fix crash on (re)boot when ConfigDB is enabled' (#7826) from fix-gopher-crash into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7826
2026-03-08 08:46:54 +00:00
nicole mikołajczyk
0592f111f6 update tests
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-06 18:10:07 +01:00
nicole mikołajczyk
40bc79e5ce Merge pull request 'Various bookmark folders-related improvements' (#7829) from mkljczk/pleroma:bookmark-folders into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7829
2026-03-06 16:50:30 +00:00
nicole mikołajczyk
87b4e3f3ff Avoid code duplication in UserView
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-06 17:50:15 +01:00
nicole mikołajczyk
a1bb81bddb Merge pull request 'Don't use the confusing TwitterAPI namespace' (#7841) from mkljczk/pleroma:twitter-api-removal into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7841
2026-03-06 16:24:33 +00:00
nicole mikołajczyk
499b2ed118 remove unused alias
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-06 17:23:54 +01:00
Phantasm
3760480813 lint 2026-03-05 20:21:19 +00:00
Phantasm
5f321b0b5b Favicon Plug: Halt Plug pipeline when favicon not found 2026-03-05 20:21:19 +00:00
Phantasm
d0db1f00c3 Favicon Plug: assert HTTP 200 status in tests 2026-03-05 20:21:19 +00:00
Phantasm
662c9f36ac Favicon Plug: Update moduledoc and rename to adhere to convention 2026-03-05 20:21:19 +00:00
Phantasm
2388964b14 Favicon Plug: Add tests 2026-03-05 20:21:19 +00:00
Phantasm
d03ae43ee0 Favicon Plug: Simplify and pass when not requesting favicon 2026-03-05 20:21:19 +00:00
Yonle
8975129680 webplug(favicon): remove check on url path. 2026-03-05 20:21:19 +00:00
Yonle
96f252023e constants: remove favicon.png from static_only_files 2026-03-05 20:21:19 +00:00
Yonle
0879dd3950 endpoint: reorder: handle favicon plug first 2026-03-05 20:21:19 +00:00
Yonle
4bc0b26abe changelog.d: add cache-control-immutable 2026-03-05 20:21:19 +00:00
Yonle
8abd25950a endpoint: use favicon plug 2026-03-05 20:21:19 +00:00
Yonle
970e0f9044 endpoint: set cache control for favicon.png
Signed-off-by: Yonle <yonle@proton.me>
2026-03-05 20:21:19 +00:00
Yonle
848b3f5d5b reverse_proxy,endpoint,uploaded_media: add immutable cache-control flag 2026-03-05 20:21:19 +00:00
Phantasm
222306ff27 Merge pull request 'Fix AccountController Plug warning from typo' (#7848) from phnt/pleroma:plug-test-typo into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7848
2026-03-03 22:20:34 +00:00
Phantasm
ca38217898
Fix AccountController Plug warning
the URI path used in plug tests must start with "/", got: "api/v1/blocks"
  (plug 1.19.1) lib/plug/adapters/test/conn.ex:14: Plug.Adapters.Test.Conn.conn/4
  (phoenix 1.7.14) lib/phoenix/test/conn_test.ex:236: Phoenix.ConnTest.dispatch_endpoint/5
  (phoenix 1.7.14) lib/phoenix/test/conn_test.ex:225: Phoenix.ConnTest.dispatch/5
  test/pleroma/web/mastodon_api/controllers/account_controller_test.exs:2099: Pleroma.Web.MastodonAPI.AccountControllerTest."test getting a list of blocks"/1
  (ex_unit 1.19.5) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2
  (ex_unit 1.19.5) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2
  (ex_unit 1.19.5) lib/ex_unit/runner.ex:477: anonymous fn/3 in ExUnit.Runner.maybe_capture_log/3
  (stdlib 7.2) timer.erl:599: :timer.tc/2
  (ex_unit 1.19.5) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4
2026-03-03 23:11:39 +01:00
nicole mikołajczyk
19025563e2 fixes
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-03 17:32:32 +01:00
nicole mikołajczyk
65c7d0c7b9 Merge pull request 'Update comment for prepare_object, rename prepare_outgoing' (#7818) from mkljczk/pleroma:update-comment into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7818
2026-03-03 12:49:50 +00:00
nicole mikołajczyk
490cd33bc9 Support lists exclusive param
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-03 12:48:37 +00:00
nicole mikołajczyk
8921dbfffd changelog
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-03 12:48:12 +00:00
Oneric
b645643cfb Merge pull request 'Allow fine-grained announce visibilities' (#941) from Oneric/akkoma:announce-visibility into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/941
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-03 12:48:12 +00:00
nicole mikołajczyk
68de463392 Merge pull request 'update mix.exs deps versions to match mix.lock so they don't look that scary' (#7839) from mkljczk/pleroma:mix-exs-update into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7839
Reviewed-by: Phantasm <phnt@noreply.git.pleroma.social>
2026-03-02 23:37:01 +00:00
nicole mikołajczyk
1b182b07dc is this what i was meant to do?
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-03 00:23:14 +01:00
nicole mikołajczyk
2086561fbd Various bookmark folders-related improvements
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-02 23:41:46 +01:00
nicole mikołajczyk
3620726ff3 Merge pull request 'Add sane defaults for :database_config_whitelist, add a task to remove non-whitelisted configs' (#7837) from pleroma-database-config-whitelist into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7837
2026-03-02 22:38:31 +00:00
nicole mikołajczyk
37041aae60 update mix.exs deps versions to match mix.lock so they don't look that scary
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-02 22:50:49 +01:00
nicole mikołajczyk
c3b779036d Merge branch 'develop' into pleroma-database-config-whitelist 2026-03-01 22:44:08 +00:00
nicole mikołajczyk
36a79ab58e Merge pull request 'Add issue and pull request templates for Forgejo' (#7819) from mkljczk/pleroma:forgejo-templates into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7819
Reviewed-by: Phantasm <phnt@noreply.git.pleroma.social>
2026-03-01 22:43:10 +00:00
nicole mikołajczyk
d389359ec3 Merge pull request 'mix.exs: use correct override value' (#7838) from mkljczk/pleroma:mix-exs-fix into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7838
2026-03-01 22:42:17 +00:00
nicole mikołajczyk
6405a2e682 Merge pull request 'Move avatar_description and header_description fields to the account object' (#7828) from mkljczk/pleroma:avatar-description-mastodon-api into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7828
2026-03-01 22:40:01 +00:00
nicole mikołajczyk
38c30d50b4 Merge pull request 'Update docs on scrobbles' (#7836) from mkljczk/pleroma:docs-scrobble into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7836
2026-03-01 22:39:44 +00:00
nicole mikołajczyk
9040f97cea Merge pull request 'Do not use Enum.map for side-effects' (#7840) from mkljczk/pleroma:map-side-effects into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7840
2026-03-01 22:39:26 +00:00
nicole mikołajczyk
120719f28c Don't use the confusing TwitterAPI namespace
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-27 19:53:25 +01:00