Commit graph

10,163 commits

Author SHA1 Message Date
Mark Felder
59bfa83c9c Remove daily reachability scheduling for unreachable instances 2025-06-27 16:04:08 -07:00
Mark Felder
e58ecd3234 Merge remote-tracking branch 'origin/develop' into improved-reachability 2025-06-27 15:59:46 -07:00
feld
cf6587d344 Merge branch 'delete-instance-improvement' into 'develop'
Queue individual jobs for each user that needs to be deleted when deleting an instance.

See merge request pleroma/pleroma!4377
2025-06-27 20:25:41 +00:00
feld
f6c9b003fa Merge branch 'resurrect-mrf-quietreply' into 'develop'
Resurrect MRF.QuietReply

See merge request pleroma/pleroma!4368
2025-06-27 19:13:07 +00:00
Mark Felder
56aab905e8 Queue individual jobs for each user that needs to be deleted when deleting an instance. 2025-06-27 11:13:15 -07:00
vaartis
9be542e272 Merge branch 'handle-dislike' into 'develop'
Handle the Dislike activity by transforming into a thumbs-down emote

Closes #3378

See merge request pleroma/pleroma!4369
2025-06-21 14:18:46 +00:00
Mark Felder
37d4ed883c Change MRF logic to match when there is an inReplyTo and the public address is in the "to" field
Update the method to alter the to/cc fields for consistency and modify the tests to work without requiring a specific order items in the list
2025-06-19 14:50:45 -07:00
vaartis
490a273dc1 Merge branch 'deepl-fix' into 'develop'
Use JSON for DeepL API requests

See merge request pleroma/pleroma!4363
2025-06-18 12:11:35 +00:00
vaartis
ca7dd87e2d Merge branch 'instance-markup-info' into 'develop'
Expose markup configuration in InstanceView

See merge request pleroma/pleroma!4346
2025-06-18 10:48:15 +00:00
vaartis
cda7cbf2a1 Merge branch 'scrobbles' into 'develop'
Change ScrobbleView external link param name to use snake case

See merge request pleroma/pleroma!4243
2025-06-18 10:25:38 +00:00
Ekaterina Vaartis
7ecfb95331 Handle the Dislike activity by transforming into a thumbs-down emote 2025-06-16 14:18:15 +03:00
Haelwenn (lanodan) Monnier
a69e417020
File.mkdir_p -> Pleroma.Backports.mkdir_p 2025-06-16 12:48:47 +02:00
Haelwenn (lanodan) Monnier
00d536d9e2
backports: Copy mkdir_p TOCTOU fix from elixir PR 14242
See: https://github.com/elixir-lang/elixir/pull/14242
2025-06-16 12:46:00 +02:00
lain
bc75bb35fa Merge branch 'relaxed-also-known-as' into 'develop'
Relax alsoKnownAs requirements to just being a URI

See merge request pleroma/pleroma!4367
2025-06-14 08:30:13 +00:00
Mark Felder
33cf49e860 Resurrect MRF.QuietReply
This was not working correctly because the Publisher was stripping the public address from the cc when federating unlisted activities
2025-06-13 10:28:21 -07:00
Mark Felder
7c64bfaace Include public address in cc if original activity specified it and Publisher param_cc also has values 2025-06-12 22:42:40 -07:00
Mark Felder
23be24b92f Fix federation issue where Public visibility information in cc field was lost when sent to remote servers, causing posts to appear with inconsistent visibility across instances 2025-06-12 21:37:50 -07:00
Ekaterina Vaartis
a361b84fc9 Relax alsoKnownAs requirements to just being a URI 2025-06-11 23:24:18 +03:00
Mark Felder
a46a48fb3f PublisherWorker: change max_attempts to 13 which extends the last delivery attempt to ~4.3 days 2025-06-07 15:13:45 -07:00
Mark Felder
8383584d69 Reapply "Nodeinfo is not universally implemented"
This reverts commit 0fe03fc4ee.
2025-06-07 14:57:34 -07:00
Mark Felder
2748891e12 Change the inboxes assignment in the Publisher to better indicate it's a list containing two lists
This clarifies what is really going on here and removes confusion about the nested Enum.each |> Enum.each which both were using an assignment called "inboxes"
2025-06-07 12:26:07 -07:00
Mark Felder
83c9756825 Remove unncessary NaiveDateTime call.
Every non-nil entry in the database is considered unreachable.
2025-06-06 17:10:33 -07:00
Mark Felder
0fe03fc4ee Revert "Nodeinfo is not universally implemented"
This reverts commit b87ec49972.
2025-06-06 13:44:24 -07:00
Mark Felder
0f667761a9 The ap_id is a URL, so we can just pass that to set_reachable/1
Also only bother attempting to mark reachable if it was known to be unreachable
2025-06-06 13:01:32 -07:00
Mark Felder
b87ec49972 Nodeinfo is not universally implemented 2025-06-06 12:55:21 -07:00
Mark Felder
3d422ef325 Reachability refactor
The result of Oban jobs determine the reachability status.

Publisher jobs will cancel themselves at execution time if the target server is now unreachable.

Receiving activities does not immediately mark a server as reachable, but creates a ReachabilityWorker job to validate.

A Cron will execute daily to test all unreachable servers.
2025-06-06 12:32:09 -07:00
feld
7114635997 Merge branch 'private-functions' into 'develop'
Pleroma.User: Mark some functions as private

See merge request pleroma/pleroma!4357
2025-06-06 01:00:43 +00:00
Mark Felder
db65b35ca3 Fix test Returns JSON when format is not supported (Pleroma.Web.WebFinger.WebFingerControllerTest)
If we want to return JSON when a badly behaving client requests text/html, we still have to accept it at the Plug
2025-06-05 17:11:16 -07:00
Mark Felder
48316d168c Fix failing tests due to Builder.block/2 becoming Builder.block/3 with no default value 2025-06-05 16:55:07 -07:00
vaartis
8484e09424 Merge branch 'elixir-1.18' into 'develop'
Elixir 1.18 warnings

See merge request pleroma/pleroma!4358
2025-06-05 09:00:39 +00:00
nicole mikołajczyk
ae2c97fad8 Use JSON for DeepL API requests
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-06-04 21:32:30 +02:00
Phantasm
dc26f74961
Revert to previous tag_validator behavior
This paritally reverts commit 9710063fdc
and reverts commit 7ddae61414

See thread: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4358#note_112761
2025-06-04 19:16:59 +02:00
Ekaterina Vaartis
d95e1066b9 Fix formatting 2025-06-04 12:03:54 +03:00
Ekaterina Vaartis
6fa4f08e67 Add back String.downcase that was accidentally removed from tag_validator 2025-06-04 11:43:18 +03:00
Phantasm
1be8deda73
Remove Pleroma.OTPVersion module
Its last use was a check in lib/application.ex that was removed in
commit 0e53cb4940

Major OTP version can be fetched with System.otp_release/0.
If checking against minor versions and patch levels is needed,
revert this commit since it uses the recommended way of getting
a full OTP version string.
2025-06-03 23:17:39 +02:00
Phantasm
0e53cb4940
Remove unreachable checks for OTP < 22.2
OTP 22 is no longer supported at all.

Pleroma's dependencies cannot be built with Elixir 1.13 and
Elixir 1.14 cannot be built with OTP 22 since it depends on features not
present in OTP 22. Hence why these checks cannot get triggered anymore.
2025-06-03 23:11:37 +02:00
Phantasm
9710063fdc
Apply suggestions to 2 files. 2025-06-03 23:11:37 +02:00
lain
93ce56418e Merge branch 'permissive-webfinger' into 'develop'
WebFinger query default to return JSON when no or unrecognized accept header is provided.

Closes #3381

See merge request pleroma/pleroma!4345
2025-05-29 08:41:27 +00:00
lain
36be0d32a4 Merge branch 'expiring-blocks' into 'develop'
Add expiring blocks

See merge request pleroma/pleroma!4351
2025-05-29 08:25:21 +00:00
lain
374e8c85a7 Apply lambadalambda's suggestion(s) to 1 file(s) 2025-05-29 08:17:31 +00:00
mkljczk
4960e040c1 Merge branch 'doc-typo' into 'develop'
Fix typo in account_status function doc

See merge request pleroma/pleroma!4355
2025-05-23 13:42:32 +02:00
mkljczk
4c8a93a06d Pleroma.User: Mark some functions as private
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
2025-05-19 10:03:48 +02:00
Phantasm
af81f7bf82
Don't use deprecated function invocation syntax
warning: using map.field notation (without parentheses) to invoke function TranslationMock.configured?() is deprecated, you must add parentheses instead: remote.function()
2025-05-14 17:00:19 +02:00
Phantasm
5addbf39fb
Elixir 1.18 Deal with :warnings_as_errors deprecation in compiler_options/1
warning: :warnings_as_errors is deprecated as part of Code.get_compiler_option/1
  (elixir 1.18.3) lib/code.ex:1597: Code.get_compiler_option/1
  (elixir 1.18.3) lib/code.ex:1572: anonymous fn/2 in Code.compiler_options/1
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
  (elixir 1.18.3) lib/code.ex:1571: Code.compiler_options/1
  (pleroma 2.9.1-77-g8ec49c59-elixir-1-18+test) lib/pleroma/application.ex:104: Pleroma.Application.start/2
  (kernel 10.2.6) application_master.erl:295: :application_master.start_it_old/4

warning: :warnings_as_errors is deprecated as part of Code.put_compiler_option/2, instead you must pass it as a --warnings-as-errors flag. If you need to set it as a default in a mix task, you can also set it under aliases: [compile: "compile --warnings-as-errors"]
  (elixir 1.18.3) lib/code.ex:1710: Code.put_compiler_option/2
  (elixir 1.18.3) lib/code.ex:1573: anonymous fn/2 in Code.compiler_options/1
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
  (elixir 1.18.3) lib/code.ex:1571: Code.compiler_options/1
  (pleroma 2.9.1-77-g8ec49c59-elixir-1-18+test) lib/pleroma/application.ex:104: Pleroma.Application.start/2
  (kernel 10.2.6) application_master.erl:295: :application_master.start_it_old/4
2025-05-13 14:02:47 +02:00
Phantasm
63cbc1208d
Elixir 1.18 Replace Tuple.append/2 with Tuple.insert_at/3
warning: Tuple.append/2 is deprecated. Use insert_at instead
     │
 305 │     Enum.reduce(entity, {}, &Tuple.append(&2, to_elixir_types(&1)))
     │                                    ~
     │
     └─ lib/pleroma/config_db.ex:305:36: Pleroma.ConfigDB.to_elixir_types/1
2025-05-13 14:02:47 +02:00
Phantasm
59d17a5b20
Elixir 1.18 Move Update activity validation to separate function
warning: Pleroma.Web.ActivityPub.ObjectValidators.AcceptRejectValidator.cast_and_validate/2 is undefined or private. Did you mean:

   * cast_and_validate/1

    │
227 │       validator == UpdateValidator -> fn o -> validator.cast_and_validate(o, meta) end
    │                                                         ~
    │
    └─ lib/pleroma/web/activity_pub/object_validator.ex:227:57: Pleroma.Web.ActivityPub.ObjectValidator.validate/2
2025-05-13 14:01:47 +02:00
Phantasm
25e7b12a6b
Elixir 1.18 Remove seemingly unneeded cond
warning: this clause in cond will always match:

<<"#", name::binary>>

since it has type:

binary()

where "name" was given the type:

%{"type" => "Hashtag", "name" => name} = data

   typing violation found at:
   │
55 │         "#" <> name -> name
   │                     ~
   │
   └─ lib/pleroma/web/activity_pub/object_validators/tag_validator.ex:55:21: Pleroma.Web.ActivityPub.ObjectValidators.TagValidator.changeset/2
2025-05-13 10:21:44 +02:00
Phantasm
53d7b205e8
Elixir 1.18 <%# deprecated syntax warning
warning: <%# is deprecated, use <%!-- or add a space between <% and # instead
    │
  5 │       <%# Note: using hidden input with `unchecked_value` in order to distinguish user's empty selection from `scope` param being omitted %>
    │       ~
    │
    └─ lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex:5: (file)
2025-05-12 16:17:32 +02:00
mkljczk
68a5c60113 another doc update 2025-05-08 13:45:22 +02:00
mkljczk
63afd9a22d Fix condition for moderation log force_password_reset action 2025-05-07 17:29:27 +02:00