Commit graph

6893 commits

Author SHA1 Message Date
Mark Felder
7e37882cf7 Fix order of args for favorite/2 2024-07-22 18:25:37 -04:00
feld
f77911f05b Merge branch 'oban/more-improvements' into 'develop'
Oban: more improvements

See merge request pleroma/pleroma!4187
2024-07-22 17:45:44 +00:00
e0d0992e10 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-07-21 12:36:25 +02:00
Mark Felder
cf70656d14 Fix test now that the reject error has more detail 2024-07-20 23:58:47 -04:00
Mark Felder
fb654acfad Fix OpenGraph and Twitter metadata providers when parsing objects with no content or summary fields. 2024-07-20 23:48:54 -04:00
Mark Felder
d44765bc13 Support cancelling jobs when Unreacting 2024-07-20 15:14:46 -04:00
Mark Felder
304b7f5093 Support cancelling jobs when Unrepeating 2024-07-20 15:06:19 -04:00
Mark Felder
86ae00f9da Support cancelling jobs when Unfavoriting 2024-07-20 14:54:31 -04:00
Mark Felder
3f5c9f003b Reorganize test group to have shared a shared setup 2024-07-20 14:54:31 -04:00
Mark Felder
62280a3b9f Cancel queued (undelivered) publishing jobs for an activity when deleting that activity. 2024-07-20 14:54:04 -04:00
Mark Felder
d124d8645e Rework some Rich Media functionality for better error handling
Oban should not retry jobs that are likely to fail again
2024-07-17 12:40:07 -04:00
Mark Felder
2f14990c5c Change PurgeExpiredActivity to use the background queue 2024-07-15 11:45:13 -04:00
9055a3b49a Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-07-13 17:49:07 +02:00
Mark Felder
f52b229baa Oban: change :discard return values to :cancel
:discard will be removed in Oban 3.0. It was only meant for internal use.
2024-07-12 11:40:59 -04:00
15508da194 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-07-10 23:50:06 +02:00
fc32646f7f Merge branch 'fork' into backend-new
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-30 12:06:48 +02:00
Lain Soykaf
ba88c5078a StripLocationTest: Add failing test for PNGs 2024-06-28 20:31:03 +04:00
Mark Felder
b135fa35a1 RichMedia: test that activity is streamed out 2024-06-24 09:47:16 -04:00
5d1cb904ac Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-24 11:37:28 +02:00
Mark Felder
634e3d4155 Add test validating the activity_id is correctly present in the Oban job
This was preventing the activity from being streamed over websockets.
2024-06-23 21:45:56 -04:00
Mark Felder
7d5065819c Enable erratic tests 2024-06-20 19:43:39 +00:00
Mark Felder
c765fcbe7e Gun Connection Pool: successfully retry after reclaiming the pool 2024-06-20 14:03:22 -04:00
Mark Felder
17d04ccc8b RichMedia backfill processing through Oban 2024-06-19 23:20:22 -04:00
Mark Felder
4dfa50f256 Rename RichMediaExpirationWorker to RichMediaWorker 2024-06-19 22:24:48 -04:00
Mark Felder
3a8420b141 Remove remaining vestiges of Logger support in ConfigDB/TransferTask 2024-06-19 14:29:44 -04:00
Mark Felder
e43e09a04c Merge remote-tracking branch 'origin/develop' into bugfix/elixir-1.15 2024-06-18 16:47:01 +00:00
Mark Felder
3aed111a42 Enable capture_log globally 2024-06-18 10:50:31 -04:00
Mark Felder
9c67637255 Refactor the async user refreshing to use Oban
Previous implementation could cause duplicate simultaneous profile fetches which is not polite.
2024-06-17 10:41:14 -04:00
Mark Felder
e37845cd35 Stale user refreshing should be done async to prevent blocking of rendering activities 2024-06-16 17:39:35 -04:00
Haelwenn (lanodan) Monnier
3d0d2a4513 media_controller_test: Make sure uploader is the Local one 2024-06-12 15:18:47 -04:00
Haelwenn (lanodan) Monnier
cb91dab75f Switch formatting checks to Elixir 1.15 2024-06-12 15:18:47 -04:00
Lain Soykaf
1ae5c2b020 Transmogrifier: Encode Emoji id to be valid. 2024-06-12 12:41:33 +04:00
Mark Felder
5c8afbe646 Fix tests 2024-06-11 18:55:10 -04:00
Mark Felder
a291a6b8c0 Ensure the webpush notification for e.g., mentions start with the nickname of the actor it originates from 2024-06-11 18:15:32 -04:00
Mark Felder
568819c08a WebPush refactoring: separate build and deliver steps 2024-06-11 17:58:02 -04:00
Mark Felder
2fd155fb9b Add PollWorker test; move the streaming notification test to it 2024-06-11 15:59:48 -04:00
Mark Felder
f000dab372 Switch test case to Impl.build_content/3 2024-06-08 22:54:59 -04:00
Mark Felder
8468d78882 Increase web push character limit for the body 2024-06-08 22:54:59 -04:00
Mark Felder
3211557f74 Render nice web push notifications for polls 2024-06-08 22:08:12 -04:00
Mark Felder
a5424c3681 Test that end of poll notifications are streamed over websockets 2024-06-08 13:08:28 -04:00
2afe272595 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-08 15:37:29 +02:00
feld
f44987bd0f Merge branch 'bugfix/rich_media_config' into 'develop'
RichMedia: Respect configuration on status previews

See merge request pleroma/pleroma!4130
2024-06-07 20:37:19 +00:00
Mark Felder
49156f0183 Fixes for default disabled rich media in test environment
Also add a test to validate the correct error when disabled
2024-06-07 13:31:34 -04:00
d7468558b8 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-04 18:36:25 +02:00
9040b98b07 Merge branch 'multilang' into backend-new
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-02 15:15:37 +02:00
e80715c06d fix tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-02 13:54:55 +02:00
lain
acde8d0e0c Merge branch 'ipfs-dialyzer-fixes' into 'develop'
IPFS uploader: dialyzer fixes

See merge request pleroma/pleroma!4129
2024-06-01 11:30:42 +00:00
305a8d9c98 Merge branch 'fork' into multilang 2024-05-31 23:21:08 +02:00
48be78b375 MultiLanguage: Remove map_to_str
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-31 23:21:02 +02:00
Floatingghost
0302431888
Use proper workers for fetching pins instead of an ad-hoc task
BUG: https://git.pleroma.social/pleroma/pleroma/-/issues/3276
2024-05-31 09:09:04 -04:00
Mark Felder
cfc8d7aade IPFS uploader: dialyzer fixes
lib/pleroma/uploaders/ipfs.ex:43:no_return
Function put_file/1 has no local return.
________________________________________________________________________________
lib/pleroma/uploaders/ipfs.ex:49:call
The function call will not succeed.

Pleroma.HTTP.post(
  binary(),
  _mp :: %Tesla.Multipart{
    :boundary => binary(),
    :content_type_params => [binary()],
    :parts => [
      %Tesla.Multipart.Part{
        :body => binary(),
        :dispositions => [any()],
        :headers => [any()]
      },
      ...
    ]
  },
  [],
  [{:params, [{:"cid-version", <<49>>}]}]
)

will never return since the success typing is:
(binary(), binary(), [{binary(), binary()}], Keyword.t()) ::
  {:error, _}
  | {:ok,
     %Tesla.Env{
       :__client__ => %Tesla.Client{
         :adapter => nil | {_, _} | {_, _, _},
         :fun => _,
         :post => [any()],
         :pre => [any()]
       },
       :__module__ => atom(),
       :body => _,
       :headers => [{_, _}],
       :method => :delete | :get | :head | :options | :patch | :post | :put | :trace,
       :opts => [{_, _}],
       :query => [{_, _}],
       :status => nil | integer(),
       :url => binary()
     }}

and the contract is
(Pleroma.HTTP.Request.url(), String.t(), Pleroma.HTTP.Request.headers(), :elixir.keyword()) ::
  {:ok, Tesla.Env.t()} | {:error, any()}
2024-05-30 15:14:27 -04:00
Mark Felder
b5fcb82bff Test for missing FK indexes 2024-05-30 10:49:45 -04:00
697c97873b Fix test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-29 23:29:40 +02:00
Lain Soykaf
f663135724 DatabaseTest: Fix test. 2024-05-28 18:54:36 +04:00
da19454471 Merge branch 'fork' into multilang
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-28 16:39:20 +02:00
a0eff7cc94 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-28 16:35:22 +02:00
Lain Soykaf
a041879eaa Linting 2024-05-28 18:26:30 +04:00
Lain Soykaf
cc42b50c5b Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-feature/akkoma-prune-old-posts 2024-05-28 16:51:19 +04:00
Lain Soykaf
8066645f71 Linting 2024-05-28 14:20:48 +04:00
Lain Soykaf
f5978da676 HTTPSignaturePlugTest: Rewrite to use mox. 2024-05-28 14:00:25 +04:00
Lain Soykaf
3b4be5daa2 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-secure-mode 2024-05-28 12:31:12 +04:00
Lain Soykaf
687ac4a850 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into auth-fetch-exception 2024-05-27 23:09:17 +04:00
feld
38db406ce4 Merge branch 'simpler-oban-queues' into 'develop'
Oban queue simplification

See merge request pleroma/pleroma!4123
2024-05-27 19:02:53 +00:00
lain
121791882f Merge branch 'explicitly-allow-unsafe-2' into 'develop'
Explicitly allow unsafe 2

See merge request pleroma/pleroma!4125
2024-05-27 18:43:05 +00:00
lain
3316a7ab70 Merge branch 'qdrant-search-2' into 'develop'
Search: Basic Qdrant/Ollama search

See merge request pleroma/pleroma!4109
2024-05-27 18:41:20 +00:00
Lain Soykaf
81e44ced0c HTTPSecurityPlug: Fix tests 2024-05-27 22:13:20 +04:00
Mark Felder
f63e44b8bc Fix Oban related tests 2024-05-27 13:48:24 -04:00
Lain Soykaf
1c699144d2 HttpSecurityPlug: Don't allow unsafe-eval by default 2024-05-27 21:26:40 +04:00
lain
07b7a8d697 Merge branch 'image-description-summary' into 'develop'
Add support for Honk "summary" + "name"

See merge request pleroma/pleroma!3854
2024-05-27 16:51:07 +00:00
a3ea7c9f06 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-27 18:49:49 +02:00
Alex Gleason
5e963736ce Add AntiMentionSpamPolicy 2024-05-27 12:25:09 -04:00
Lain Soykaf
f4c0a01f09 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into image-description-summary 2024-05-27 20:03:14 +04:00
Lain Soykaf
d3e85da0fd Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into auth-fetch-exception 2024-05-27 19:27:02 +04:00
lain
e93ae96e13 Merge branch 'nsfw-api-mrf' into 'develop'
NSFW API Policy

See merge request pleroma/pleroma!3471
2024-05-27 15:20:43 +00:00
Lain Soykaf
4325b1aec3 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into nsfw-api-mrf 2024-05-27 17:49:31 +04:00
Lain Soykaf
3055c1598b IPFSTest: Fix configuration mocking 2024-05-27 17:22:18 +04:00
Lain Soykaf
825b4122a5 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-ipfs_uploader 2024-05-27 16:23:40 +04:00
Lain Soykaf
f214c2cdac NotificationTest: Remove impossible case. 2024-05-27 15:23:33 +04:00
Lain Soykaf
4d6316b488 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into reject-replies-to-deleted 2024-05-27 15:19:53 +04:00
Lain Soykaf
f4c04e6b2d QdrantSearch: Add health checks. 2024-05-27 14:21:55 +04:00
Lain Soykaf
8b76f56050 QdrantSearch: Add healthcheck for qdrant 2024-05-27 14:01:17 +04:00
Lain Soykaf
08e9d995f8 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into qdrant-search-2 2024-05-27 13:50:22 +04:00
lain
5e43060128 Merge branch 'search-healthcheck' into 'develop'
Search backend healthcheck process

See merge request pleroma/pleroma!4120
2024-05-27 09:46:57 +00:00
Mark Felder
d4769b076a Return a 422 when trying to reply to a deleted status 2024-05-26 15:14:48 -04:00
Mark Felder
03f4b46189 Test that healthchecks behave correctly for the expected HTTP responses 2024-05-26 14:21:24 -04:00
Mark Felder
354b700bed Assert that AWS URLs without query parameters do not crash 2024-05-26 14:01:12 -04:00
1268453a43 Merge branch 'fork' into multilang
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-23 17:37:16 +02:00
4cab6a9db0 Fix tests and regressions
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-23 17:05:52 +02:00
Lain Soykaf
a566ad56e1 QdrantSearch: Fix actor / author restriction 2024-05-23 18:55:16 +04:00
bfc1ee8a82 Fix NotificationTest
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-23 13:44:22 +02:00
Lain Soykaf
94e4f21589 QdrantSearch: Deal with actor restrictions 2024-05-23 14:38:30 +04:00
e7c8510714 HttpRequestMock cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-23 12:34:35 +02:00
2478532869 Fix warnings
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-23 12:12:56 +02:00
Lain Soykaf
f726e5fbbd Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into qdrant-search-2 2024-05-22 20:07:43 +04:00
9876411269 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-22 17:17:04 +02:00
Lain Soykaf
5f1f574f01 WebFingerControllerTest: Restore host after test. 2024-05-22 18:45:34 +04:00
70cabbf6dc Fix tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-22 15:53:16 +02:00
d0b18e338b Fix validate_webfinger when running a different domain for Webfinger
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-22 15:52:35 +02:00
Lain Soykaf
206ea92837 Webfinger: Fix test 2024-05-22 12:59:10 +04:00
Alex Gleason
b15f8b0642 Prevent webfinger spoofing 2024-05-22 12:57:45 +04:00
Lain Soykaf
d1b053f3ba Webfinger: Add test showing wrong webfinger behavior 2024-05-22 12:57:30 +04:00
ef50dd588b Merge branch 'fork' into multilang 2024-05-21 13:57:28 +02:00
lain
7fca598268 Merge branch 'status-notification-type' into 'develop'
Add "status" notification type

See merge request pleroma/pleroma!3659
2024-05-21 05:01:45 +00:00
d7f90782e2 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-20 23:32:49 +02:00
Lain Soykaf
c67506ba68 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into auth-fetch-exception 2024-05-20 18:21:46 +04:00
lain
e8cd6662eb Merge branch 'familiar-followers' into 'develop'
Implement `/api/v1/accounts/familiar_followers`

See merge request pleroma/pleroma!4098
2024-05-19 12:05:55 +00:00
Lain Soykaf
72ec261a69 B QdrantSearch: Switch to OpenAI api 2024-05-19 12:17:46 +04:00
Lain Soykaf
cc1321ea2e Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into qdrant-search-2 2024-05-19 11:51:33 +04:00
lain
401aca2548 Merge branch 'mark-read' into 'develop'
PleromaAPI: Simplify marking notifications as read

See merge request pleroma/pleroma!4111
2024-05-19 07:48:32 +00:00
Mark Felder
d07d49227f PleromaAPI: marking notifications as read no longer returns notifications 2024-05-18 18:17:35 +00:00
3d4510efee Merge remote-tracking branch 'mkljczk-github/fork' into multilang 2024-05-18 16:12:28 +02:00
Lain Soykaf
3345ddd2d4 Linting 2024-05-18 15:02:22 +04:00
Lain Soykaf
7923ede8ba Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into qdrant-search-2 2024-05-18 14:45:26 +04:00
Lain Soykaf
e3933a067f QdrantSearch: Implement post deletion 2024-05-18 14:04:32 +04:00
Lain Soykaf
933117785f QdrantSearch: Add basic test 2024-05-18 13:43:47 +04:00
2e76ceb5b4 Merge remote-tracking branch 'origin/develop' into status-notification-type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-18 11:30:25 +02:00
cc4fccdd80 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-17 18:44:47 +02:00
feld
9988dc2227 Revert "Merge branch 'strip-object-actor' into 'develop'"
This reverts merge request !4105
2024-05-16 23:33:48 +00:00
feld
e944b15298 Merge branch 'strip-object-actor' into 'develop'
Strip actor from objects before federating

Closes #3269

See merge request pleroma/pleroma!4105
2024-05-15 20:51:47 +00:00
feld
53ef576739 Merge branch 'instance_rules' into 'develop'
Instance rules

See merge request pleroma/pleroma!3669
2024-05-15 20:29:04 +00:00
548473a818 Remove unused and fix
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-15 00:04:08 +02:00
tusooa
3d3162f3e6 Make no_placeholder_text_policy multilang-aware 2024-05-14 23:48:28 +02:00
tusooa
fb2688952f Make normalize_markup multilang aware 2024-05-14 23:48:24 +02:00
tusooa
e958ec57db Make no_empty_policy multilang-aware 2024-05-14 23:48:21 +02:00
tusooa
9354ee31d2 Make keyword_policy multilang-aware 2024-05-14 23:48:18 +02:00
tusooa
2d66faf9a4 Make force_mentions_in_content multilang aware
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:48:14 +02:00
tusooa
cd0260f309 Make ensure_re_prepended multilang-aware
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:47:41 +02:00
tusooa
9555e630fd Post single-language status with language attribute 2024-05-14 23:47:10 +02:00
tusooa
c4cec5fd6a Render language attr of a status
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:47:05 +02:00
tusooa
c34a4d816f Accept description_map when updating media
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:45:58 +02:00
tusooa
a9b1589528 Validate multilang map
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:44:47 +02:00
tusooa
4d2813ae41 Accept multilang descriptions when uploading attachments
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:43:36 +02:00
tusooa
b1bdbdcf05 Accept multilang polls on MastoAPI 2024-05-14 23:42:15 +02:00
tusooa
72a2b3329e Accept status_map and spoiler_text_map in POST statuses
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:42:07 +02:00
tusooa
0d96c04019 Accept map of strings in ActivityDraft
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:37:44 +02:00
tusooa
e11d4b6923 Render multilang in polls
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:36:04 +02:00
tusooa
6b20df1e2d Render multilang for attachments 2024-05-14 23:35:32 +02:00
tusooa
64db6ce871 Render multilang of sources
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:35:23 +02:00
tusooa
ad8f47fe8f Display multilang in history items 2024-05-14 23:34:58 +02:00
tusooa
39cdde78e1 Render status with multilang maps
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:34:48 +02:00
tusooa
4cfd7b4f79 Convert nameMap in question options 2024-05-14 23:22:57 +02:00
tusooa
5c62c50e9b Generate * from *Map
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:22:45 +02:00
tusooa
4bcae3597f Treat empty maps as nils 2024-05-14 23:20:29 +02:00
tusooa
dbebd7fbf4 Validate language codes in MapOfString 2024-05-14 23:20:18 +02:00
tusooa
8822dc1191 Add functions to process multi-language content
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:20:12 +02:00
tusooa
00591d9016 Add support for *Map attributes
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 23:19:45 +02:00
adbd40049d Merge remote-tracking branch 'mkljczk-github/fork' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 18:11:23 +02:00
7a03e49c4d Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 18:10:03 +02:00
8c3f306c62 Revert to pleroma' card parser
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 17:54:13 +02:00
Mark Felder
16c72d0701 Merge branch 'develop' into fix-muted-web-push 2024-05-11 08:06:04 -04:00
faried nawaz
1bf3ae07b6
add options to mix pleroma.database prune_objects to delete more activities 2024-05-09 10:43:34 +05:00
Mark Felder
ccceb41bf3 Add test for StatusView rendering of Cards when missing descriptions 2024-05-08 13:54:57 -04:00
Mark Felder
5e7f4f687e Improve StatusView tests for Cards 2024-05-08 13:52:25 -04:00
Mark Felder
19002fd6c1 Mastodon API: Remove deprecated GET /api/v1/statuses/:id/card endpoint
Removed back in 2019

https://github.com/mastodon/mastodon/pull/11213
2024-05-08 01:44:58 +00:00
Mark Felder
37de58823f Remove test validating missing descriptions are returned as an empty string 2024-05-08 00:49:29 +00:00
Mark Felder
5bbcf5b8b7 Improve test description 2024-05-08 00:36:16 +00:00
Mark Felder
c16c023ebf Rich Media Cards are fetched asynchonously and not guaranteed to be available on first post render 2024-05-08 00:26:32 +00:00
Mark Felder
fa66bd95dc Rich Media Cards are cached by URL not per status 2024-05-08 00:23:59 +00:00
Mark Felder
d21aa1a77c Respect the TTL returned in OpenGraph tags 2024-05-07 19:54:56 -04:00
Mark Felder
f40084e019 Fix broken tests 2024-05-07 19:54:56 -04:00
feld
750fb25f48 Revert "Merge branch 'pleroma-card-image-description' into 'develop'"
This reverts merge request !4101
2024-05-07 23:20:38 +00:00
Mark Felder
dd03184811 Strip actor from objects before federating 2024-05-07 11:54:45 -04:00
0e608c98b2 Rename project to pl
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-28 23:02:11 +02:00
0bf8a2e38c Merge remote-tracking branch 'origin/develop' into HEAD
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-27 20:26:16 +02:00
lain
50af909c01 Merge branch 'pleroma-card-image-description' into 'develop'
Include image description in status media cards

See merge request pleroma/pleroma!4101
2024-04-19 07:39:05 +00:00
6f6bede900 Include image description in status media cards
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-19 10:20:31 +04:00
4f5c4d79c4 FEP-2c59, add "webfinger" to user actor
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-11 17:50:11 +02:00
cd86965cde Add hint to rules
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-06 12:01:04 +02:00
1745b128f9 AdminAPI: Allow filtering reports by rule_id
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-06 11:58:25 +02:00
3d09ea0fca Apply, suggestions, use strings for actual Mastodon API compatibility
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-06 11:57:28 +02:00
ccc3ac241f Add hint to rules
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-06 11:45:19 +02:00
9e6cf45906 /api/v1/accounts/familiar_followers
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-06 11:43:56 +02:00
01a5f839c5 Merge remote-tracking branch 'origin/develop' into instance_rules 2024-04-06 10:42:23 +02:00
2e4d034f13 Merge remote-tracking branch 'origin/develop' into backend-new
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-22 18:04:35 +01:00
5a6be1dd6e Merge remote-tracking branch 'origin/develop' into fork 2024-03-21 00:00:28 +01:00
lain
987f44d811 Merge branch 'bookmark-folders' into 'develop'
Fix BookmarkFolderView, add test

See merge request pleroma/pleroma!4096
2024-03-20 13:26:47 +00:00
9f4829695b Merge branch 'bookmark-folders' into HEAD 2024-03-20 13:25:30 +01:00
37ec645ff2 Fix BookmarkFolderView, add test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-20 13:24:43 +01:00
Mark Felder
291d531e4c Unify notification push and streaming events for both local and federated activities
This also removes generation of notifications for blocked/filtered/muted users and threads.
2024-03-19 12:11:30 -04:00
Lain Soykaf
9617189e96 Tests: Actually run the bookmark folder tests. 2024-03-19 13:51:04 +04:00
lain
8e37f19883 Merge branch 'test-improvements' into 'develop'
Tests: Explicitly set db pool size and max cases to the same value.

See merge request pleroma/pleroma!4094
2024-03-19 07:44:05 +00:00
Lain Soykaf
665947ab2a Tests: Reduced the max case number to make tests more stable. 2024-03-19 11:03:05 +04:00
Lain Soykaf
923803a533 Tests: Explicitly set db pool size and max cases to the same value. 2024-03-19 10:34:37 +04:00
8b92459345 Merge remote-tracking branch 'origin/develop' into HEAD
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-18 22:00:35 +01:00
Mark Felder
357553a64a Remove usage of :persistent_term for Postgres version storage, fix test
This test should not have been passing. The search result's activity id should not be the same id as the local post.

capture_log was not being used. Removed.
2024-03-18 16:27:52 -04:00
Mark Felder
b822a912ad Remove test for postgres < 11 2024-03-18 16:15:40 -04:00
918c406a91 Merge remote-tracking branch 'origin/develop' into instance_rules
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-18 13:50:25 +01:00
lain
2b71f4897f Merge branch 'develop' into 'bookmark-folders'
# Conflicts:
#   docs/development/API/differences_in_mastoapi_responses.md
2024-03-18 10:35:02 +00:00
lain
cf0aa1238c Merge branch 'public-polls' into 'develop'
Expose nonAnonymous field from Smithereen polls

See merge request pleroma/pleroma!3962
2024-03-18 06:26:22 +00:00
Lain Soykaf
caf855cf9c ActivityPub.Publisher: Don't try federating if a user doesn't have an inbox. 2024-03-17 16:57:45 +04:00
lain
95bcd5d28f Merge branch 'force-mention' into 'develop'
Add ForceMention mrf

See merge request pleroma/pleroma!4082
2024-03-17 12:32:14 +00:00
feld
0b5bba23ce Merge branch 'backups' into 'develop'
Include following/followers in backups

See merge request pleroma/pleroma!4085
2024-03-15 19:32:35 +00:00
c39fae12bc Merge remote-tracking branch 'tusooa/from/upstream-develop/tusooa/import' into backend-new
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-15 11:08:04 +01:00
0fb0d081cc Merge branch 'backups-chats' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:48:54 +01:00
3a23924ee8 Reject requests from specified instances if authorized_fetch_mode is enabled
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:38:40 +01:00
51edd70319 Merge branch 'bookmark-folders' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:32:16 +01:00
0e6c94f857 Merge branch 'backups' into fork 2024-03-14 23:30:57 +01:00
53a73aada2 Merge branch 'multitenancy' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:29:24 +01:00
fb572f5aa6 Fix adding language to json ld header, add transmogrifier test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:24:38 +01:00
281c82a49b Add language from activity context in ObjectValidator
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:24:24 +01:00
c5a05a8e14 Rename test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:23:52 +01:00
86f2545068 Rename MapOfString to ContentLanguageMap
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:23:05 +01:00
cf9ecddbee Remove test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:22:22 +01:00
bdff856ab8 Move maybe_add_content_map out of Transmogrifier, use code from tusooa's branch for MapOfString
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:22:15 +01:00
d5a33cf370 Remove test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:19:06 +01:00
0a0e2ccd6e Rename test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:19:02 +01:00
edec300ddb Make status.language == nil for 'und' value
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:18:55 +01:00
adb84b1df9 Add ObjectValidators.LanguageCode type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:18:36 +01:00
bf2a10331e Allow to specify post language
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:18:17 +01:00
70a697201e Gancio support
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:13:26 +01:00
dbd24fe0c2 add test for leaving Mobilizon events
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:12:31 +01:00
fa725d50a7 Test "content" for Mobilizon statuses
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:12:27 +01:00
e9e2b18650 Merge branch 'webhooks_' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:06:25 +01:00
a97334520b Fixes
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:00:48 +01:00
612e6284b4 Remove unneeded code
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 22:50:10 +01:00
0f33698747 Merge remote-tracking branch 'origin/develop' into fork
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-12 23:08:40 +01:00
bd33a7ac8f Remove stuff I don't need to stay closer to upstream
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-12 16:07:29 +01:00
3c21a33656 Backup chats and chat messages
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-12 10:57:59 +01:00
bb0b17f4d9 Include following/followers in backups
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-10 23:53:12 +01:00
c0c4a9ed0d Merge remote-tracking branch 'origin/develop' into instance-contact-account
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-08 12:12:55 +01:00
961a5dd4cd Add test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-07 16:42:22 +01:00
b7c625db0f Merge remote-tracking branch 'origin/develop' into link-verification 2024-03-07 13:13:49 +01:00
9cfa4e67b1 Add ForceMention mrf
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-01 18:16:09 +01:00
d415686bb9 Allow to group bookmarks in folders
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-01 11:04:01 +01:00
c592a0e58d Merge remote-tracking branch 'origin/develop' into HEAD
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-22 21:05:20 +01:00
Haelwenn (lanodan) Monnier
7d624c4750
StealEmojiPolicy: Sanitize shortcodes
Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/3245
2024-02-20 09:09:54 +01:00
feld
4dd8a1a1ca Merge branch 'websocket-refactor' into 'develop'
Websocket refactor to use Phoenix.Socket.Transport

See merge request pleroma/pleroma!4064
2024-02-15 14:36:54 +00:00
Haelwenn
d19642d7eb Merge branch 'bugfix-ccworks' into 'develop'
Bugfix for ccworks AP bridge

Closes #3234

See merge request pleroma/pleroma!4043
2024-02-15 01:30:22 +00:00
Mark Felder
d0f4b2b02f Remove invalid test
It is not allowed to use the Sec-WebSocket-Protocol header for arbitrary values. This was possible due to the raw websocket handling we were doing with Cowboy, but Phoenix.Socket.Transport does not allow this as the value of this header is compared against a static list of subprotocols.

https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#socket/3-websocket-configuration

Additionally I cannot find anywhere that we depended on this behavior. Setting the Sec-WebSocket-Protocol header does not appear to be a part of PleromaFE.
2024-02-14 15:27:12 -05:00
marcin mikołajczak
81414cc413 Merge branch 'translateLocally' into 'main'
Support translateLocally translation provider

See merge request soapbox-pub/rebased!302
2024-02-14 08:45:50 +00:00
eb1995d7c6 Add test for translateLocally
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-13 20:10:10 +01:00
97d6d85f7e Merge remote-tracking branch 'origin/develop' into multitenancy 2024-02-07 17:54:50 +01:00
Mark Felder
6b7b443ff9 Pleroma.Web.RichMedia.Parser: Remove test-specific codepaths
Also consolidate Tesla mocks into the HttpRequestMock module.

Tests were not exercising the real codepaths. The Rich Media Preview only works with https, but most of these tests were only mocking http.
2024-02-06 18:33:54 -05:00
Mark Felder
0cc038b67c Ensure URLs with IP addresses for the host do not generate previews 2024-02-05 00:09:37 -05:00
Mark Felder
04fc4eddaa Fix Rich Media Previews for updated activities
The Rich Media Previews were not regenerated when a post was updated due to a cache invalidation issue. They are now cached by the activity id so they can be evicted with the other activity cache objects in the :scrubber_cache.
2024-02-04 23:47:04 -05:00
226e53fdd7 Merge remote-tracking branch 'origin/develop' into status-notification-type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-01-31 22:19:33 +01:00
Mark Felder
dec82a6a36 Phoenix.Endpoint.Cowboy2Handler does not exist
This should have always failed as it would not be an existing atom. Unclear how it worked since the upgrade to Phoenix 1.6.
2024-01-30 16:58:19 -05:00
Mark Felder
1e76ceacd5 Revert "Pleroma.Web.AdminAPI.ConfigController: dialyzer error"
This reverts commit 60d89cb404.
2024-01-30 14:19:13 -05:00
Mark Felder
b666710574 Pleroma.Web.MediaProxy.MediaProxyController: dialyzer errors
lib/pleroma/web/media_proxy/media_proxy_controller.ex:55:no_return
Function handle_preview/2 has no local return.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:59:call
The function call will not succeed.

Pleroma.HTTP.request(<<72, 69, 65, 68>>, _media_proxy_url :: any(), [], [], [{:pool, :media}])

will never return since the success typing is:
(
  :delete | :get | :head | :options | :patch | :post | :put | :trace,
  binary(),
  any(),
  [{binary(), binary()}],
  Keyword.t()
) :: any()

and the contract is
(
  method(),
  Pleroma.HTTP.Request.url(),
  String.t(),
  Pleroma.HTTP.Request.headers(),
  :elixir.keyword()
) :: {:ok, Tesla.Env.t()} | {:error, any()}

________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:95:unused_fun
Function handle_preview/3 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:111:unused_fun
Function handle_png_preview/2 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:134:unused_fun
Function handle_jpeg_preview/2 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:152:unused_fun
Function handle_video_preview/2 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:164:unused_fun
Function drop_static_param_and_redirect/1 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:173:unused_fun
Function fallback_on_preview_error/2 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:177:unused_fun
Function put_preview_response_headers/1 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:177:unused_fun
Function put_preview_response_headers/2 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:187:unused_fun
Function thumbnail_max_dimensions/0 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:196:unused_fun
Function min_content_length_for_preview/0 will never be called.
________________________________________________________________________________
lib/pleroma/web/media_proxy/media_proxy_controller.ex:200:unused_fun
Function media_preview_proxy_config/0 will never be called.
2024-01-29 18:50:50 -05:00
Haelwenn
251c455b91 Merge branch 'deps-bump' into 'develop'
Bump dependencies

See merge request pleroma/pleroma!4044
2024-01-29 17:43:00 +00:00
Mark Felder
60d89cb404 Pleroma.Web.AdminAPI.ConfigController: dialyzer error
lib/pleroma/web/admin_api/controllers/config_controller.ex:162:call
The function call will not succeed.

Phoenix.Controller.render(
  _conn :: %{:body_params => %{:configs => _, _ => _}, _ => _},
  <<105, 110, 100, 101, 120, 46, 106, 115, 111, 110>>,
  %{:configs => [any()], :need_reboot => _}
)

will never return since the success typing is:
(
  %Plug.Conn{
    :adapter => {atom(), _},
    :assigns => %{atom() => _},
    :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :halted => boolean(),
    :host => binary(),
    :method => binary(),
    :owner => pid(),
    :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :path_info => [binary()],
    :path_params => %{binary() => binary() | [any()] | map()},
    :port => char(),
    :private => %{atom() => _},
    :query_params => %Plug.Conn.Unfetched{
      :aspect => atom(),
      binary() => binary() | [any()] | map()
    },
    :query_string => binary(),
    :remote_ip =>
      {byte(), byte(), byte(), byte()}
      | {char(), char(), char(), char(), char(), char(), char(), char()},
    :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()},
    :req_headers => [{_, _}],
    :request_path => binary(),
    :resp_body =>
      nil
      | binary()
      | maybe_improper_list(
          binary() | maybe_improper_list(any(), binary() | []) | byte(),
          binary() | []
        ),
    :resp_cookies => %{binary() => map()},
    :resp_headers => [{_, _}],
    :scheme => :http | :https,
    :script_name => [binary()],
    :secret_key_base => nil | binary(),
    :state =>
      :chunked | :file | :sent | :set | :set_chunked | :set_file | :unset | :upgraded,
    :status => nil | non_neg_integer()
  },
  atom() | binary(),
  atom() | binary() | [{_, _}] | map()
) :: %Plug.Conn{
  :adapter => {atom(), _},
  :assigns => %{atom() => _},
  :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
  :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
  :halted => boolean(),
  :host => binary(),
  :method => binary(),
  :owner => pid(),
  :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
  :path_info => [binary()],
  :path_params => %{binary() => binary() | [any()] | map()},
  :port => char(),
  :private => %{atom() => _},
  :query_params => %Plug.Conn.Unfetched{
    :aspect => atom(),
    binary() => binary() | [any()] | map()
  },
  :query_string => binary(),
  :remote_ip =>
    {byte(), byte(), byte(), byte()}
    | {char(), char(), char(), char(), char(), char(), char(), char()},
  :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()},
  :req_headers => [{_, _}],
  :request_path => binary(),
  :resp_body =>
    nil
    | binary()
    | maybe_improper_list(
        binary() | maybe_improper_list(any(), binary() | []) | byte(),
        binary() | []
      ),
  :resp_cookies => %{binary() => map()},
  :resp_headers => [{_, _}],
  :scheme => :http | :https,
  :script_name => [binary()],
  :secret_key_base => nil | binary(),
  :state => :sent,
  :status => nil | non_neg_integer()
}

and the contract is
(Plug.Conn.t(), binary() | atom(), Keyword.t() | map()) :: Plug.Conn.t()
2024-01-27 16:42:30 -05:00
Mark Felder
1b40ebfa20 Pleroma.Signature: dialyzer error
lib/pleroma/signature.ex:30:pattern_match
The pattern can never match the type.

Pattern:
%{<<97, 112, 95, 105, 100>> => _ap_id}

Type:
{:error, _} | {:ok, map()}
2024-01-26 21:03:41 -05:00
Mark Felder
06b8923d42 RichMedia.Parser.TTL.AwsSignedUrl: dialyzer fix
lib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex:9:callback_type_mismatch
Type mismatch for @callback ttl/2 in Pleroma.Web.RichMedia.Parser.TTL behaviour.

Expected type:
nil | integer()

Actual type:
{:error, <<_::64, _::size(8)>>} | {:ok, integer()}
2024-01-26 17:37:32 -05:00
Mark Felder
5b95abaeea Credo.Check.Readability.PredicateFunctionNames
This check was recently improved in Credo and it does make sense for readability.

The offending functions in Pleroma have been renamed and a couple missing the ? suffix have been fixed as well.
2024-01-26 16:59:58 -05:00
Haelwenn (lanodan) Monnier
558b421079
Test incoming federation from Convergence AP Bridge 2024-01-26 17:05:18 +01:00
Haelwenn (lanodan) Monnier
0de1a7629c
Maps: Add filter_empty_values/1 2024-01-26 16:18:29 +01:00
7c36a91657 Fixes, update tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-01-24 23:35:38 +01:00
913465f3d2 Merge remote-tracking branch 'origin/develop' into multitenancy-v2
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-01-24 16:59:21 +01:00
Haelwenn
ab3f03a04a Merge branch 'develop' into 'public-polls'
# Conflicts:
#   docs/development/API/differences_in_mastoapi_responses.md
2024-01-21 12:03:29 +00:00
Haelwenn
3c65a2899d Merge branch 'handle_object_fetch_failures' into 'develop'
Handle object fetch failures gracefully

See merge request pleroma/pleroma!4015
2024-01-19 18:43:00 +00:00