Commit graph

639 commits

Author SHA1 Message Date
Ilja
e3107fee98 Fix eratic test for POST /api/pleroma/admin/reports/:id/notes
It retrieved two ReportNotes and then checked one of them. But the order isn't guaranteed, while the test tested on the content of the first ReportNote.

I made the test on the content more generic
2022-06-29 20:47:10 +01:00
Tusooa Zhu
2df25e6666 Support fallbacking to other languages 2022-06-29 20:47:10 +01:00
Tusooa Zhu
fcfb5a4967 Lint 2022-06-29 20:47:10 +01:00
Tusooa Zhu
07bd35227a Support multiple locales from userLanguage cookie 2022-06-29 20:47:10 +01:00
Tusooa Zhu
fa95bc8725 Support multiple locales formally
elixir gettext current does not fully support fallback to another language [0].
But it might in the future. We adapt it so that all languages in Accept-Language
headers are received by Pleroma.Web.Gettext. User.languages is now a comma-separated
list.

[0]: https://github.com/elixir-gettext/gettext/issues/303
2022-06-29 20:47:10 +01:00
Tusooa Zhu
ff0bb3a3ac Add test for fallbacking to a general language 2022-06-29 20:47:10 +01:00
Tusooa Zhu
ef73f61b07 Fallback to a variant if the language in general is not supported
For an example, here, zh is not supported, but zh_Hans and zh_Hant
are. If the user asks for zh, we should choose a variant for them
instead of fallbacking to default.

Some browsers (e.g. Firefox) does not allow users to customize
their language codes. For example, there is no zh-Hans, but only
zh, zh-CN, zh-TW, zh-HK, etc. This provides a workaround for
those users suffering from bad design decisions.
2022-06-29 20:47:10 +01:00
Tusooa Zhu
72bdb0640f Allow user to register with custom language 2022-06-29 20:46:51 +01:00
Tusooa Zhu
775f997c40 Prefer userLanguage cookie over Accept-Language header in detecting locale
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-06-29 20:43:41 +01:00
Ilja
8b843be03e Fix test get_user_apps/1
For some reason I had a test who suddenly failed, mix test test/pleroma/web/o_auth/app_test.exs:54. A user has a list of applications and this test adds them and then sees if the list it gets back is the same as the apps it added.

When I ran mix test a day before I didn't have this problem and when I pushed code today in a different MR, the pipeline succeeded (see https://git.pleroma.social/ilja/pleroma/-/jobs/205827), yet locally it failed. So it seems the test can sometimes succeed and sometimes fail, which makes it untrustworthy.

The failure I see is because the returned list is in reverse order. I assume that's not per sé wrong. You just want to know if the apps you added are actually there. I fixed the test by first ordering the lists before comparing.

AFAICT (and as far as that's relevant) the test got introduced in commit cb2a072e62
2022-06-29 20:43:41 +01:00
2342fface1 Add visibility check in context path (#26)
Reviewed-on: AkkomaGang/akkoma#26
2022-06-29 09:33:57 +00:00
cac39ef817 Bugfix: standardise scheme for emoji reactions 2022-06-25 15:27:46 +01:00
cad4ba2ab3 mix format 2022-06-22 17:20:55 +01:00
3928cecf6b ensure local statuses are not visible remotely 2022-06-22 17:06:40 +01:00
502382da45 cherry-pick security from upstream 2022-06-22 16:25:05 +01:00
f2f8b81fc4
Use mediaproxy for emoji notifications if enabled 2022-06-17 14:27:22 +02:00
af1bd3af59 mix format 2022-06-14 17:43:45 +01:00
6e1d9c63da allow %{source} dict in no_empty 2022-06-14 17:41:25 +01:00
abefbcec64 Merge branch 'mfm' into develop 2022-06-14 16:25:47 +01:00
829ae13572 ensure tests pass 2022-06-14 16:24:03 +01:00
60bfaed368
Allow reacting with emojis containing a number 2022-06-14 11:47:09 +02:00
0f5bea2465 Add emoji_url to notifications to allow rendering
Ref #5
2022-06-12 13:35:14 +01:00
2abf8c982e fix secret key failure 2022-06-11 16:48:04 +01:00
24bf8c3977 mix format 2022-06-11 16:14:31 +01:00
32fbd2e4e3 fix all tests 2022-06-11 16:14:22 +01:00
c3ed86cd1e fix emoji controller tests 2022-06-11 14:21:50 +01:00
142646426e fix emoji tests 2022-06-11 14:08:54 +01:00
0f6bece60d Merge remote-tracking branch 'origin/patch/readd-mastofe' into develop 2022-01-08 21:45:12 +00:00
0d012ebea1 Revert "Merge branch 'remove/mastofe' into 'develop'"
This reverts commit 6b3842cf50, reversing
changes made to 6b1282a829.
2022-01-08 21:44:37 +00:00
8cc6359a85 Merge remote-tracking branch 'upstream/bookwyrm-entities' into develop 2022-01-07 20:23:53 +00:00
25b4395830 just drop unknown tags 2022-01-07 20:14:04 +00:00
92d3742072 Merge remote-tracking branch 'upstream/bookwyrm-entities' into develop 2022-01-07 17:21:44 +00:00
9ee27fb5ec add bookwyrm entity tests 2022-01-07 17:17:18 +00:00
680c5d8d89 Add compatibility with bookwyrm's weird entities 2022-01-07 16:51:04 +00:00
Alex Gleason
2ae867842b
StreamerTest: tag erratic test 2021-12-31 10:29:50 -06:00
12a171844b Merge remote-tracking branch 'upstream/develop' into develop 2021-12-30 18:05:22 +00:00
marcin mikołajczak
746c9daa62 Merge remote-tracking branch 'pleroma/develop' into mastodon-lookup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2021-12-28 16:27:27 +01:00
marcin mikołajczak
f734579965 MastoAPI: Add GET /api/v1/accounts/lookup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2021-12-28 16:11:17 +01:00
Alex Gleason
5c80d4087d
PleromaAPI.AppView: add test 2021-12-27 18:52:34 -06:00
Alex Gleason
cb2a072e62
Apps: add test for get_user_apps/1 2021-12-27 18:29:03 -06:00
Alex Gleason
2e4a1c56c3
AppController: test creating with and without a user 2021-12-27 18:14:15 -06:00
Alex Gleason
f5c3d45120
Merge remote-tracking branch 'origin/develop' into apps-api-endpoint 2021-12-27 18:01:25 -06:00
Alex Gleason
479fc5fff8
EnsureStaffPrivilegedPlug: add tests 2021-12-27 10:39:59 -06:00
Alex Gleason
913141379c Merge branch 'profile-directory' into 'develop'
MastoAPI: Profile directory

See merge request pleroma/pleroma!3573
2021-12-26 02:35:17 +00:00
marcin mikołajczak
de006443f0 MastoAPI: Profile directory 2021-12-26 02:35:17 +00:00
Alex Gleason
2c06eff519
Pleroma.Web.base_url() --> Endpoint.url() 2021-12-25 20:11:14 -06:00
Alex Gleason
db2bf55e9b
Merge remote-tracking branch 'origin/develop' into notice-routes 2021-12-25 19:57:53 -06:00
Alex Gleason
73609211a4 Merge branch 'account-notes' into 'develop'
MastoAPI: Add user notes on accounts

See merge request pleroma/pleroma!3540
2021-12-25 01:41:12 +00:00
Alex Gleason
b96a58ff28 Merge branch 'account-subscriptions' into 'develop'
MastoAPI: accept notify param in follow request

See merge request pleroma/pleroma!3555
2021-12-25 01:34:27 +00:00
Alex Gleason
d9746ae4cb Merge branch 'from/develop/tusooa/2802-propagate-reject' into 'develop'
Handle Reject for already-accepted Follows properly

Closes #2766 and #2802

See merge request pleroma/pleroma!3568
2021-12-23 16:00:16 +00:00