Commit Graph

14180 Commits

Author SHA1 Message Date
Ilja 75169a45f6
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy 2022-05-09 10:44:43 -05:00
Haelwenn (lanodan) Monnier 7b25571fb8
mix: Bump to 2.4.52 for 2.4.3 mergeback 2022-05-09 10:44:43 -05:00
Tusooa Zhu ecf4e51849
Skip cache when /objects or /activities is authenticated
Ref: fix-local-public
2022-05-09 10:44:43 -05:00
Tusooa Zhu 370a241dbc
Allow to skip cache in Cache plug
Ref: fix-local-public
2022-05-09 10:44:43 -05:00
Ilja 0fe674d898
update sweet_xml [Security] 2022-05-09 10:44:43 -05:00
Tusooa Zhu f52283004b
Fix incorrect fallback when English is set to first language 2022-05-09 10:44:43 -05:00
Ilja d48ade7629
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-05-09 10:44:43 -05:00
Tusooa Zhu 57faa36243
Support fallbacking to other languages 2022-05-09 10:44:43 -05:00
Tusooa Zhu ed9681270e
Lint 2022-05-09 10:44:43 -05:00
Tusooa Zhu 20c6b3c597
Support multiple locales from userLanguage cookie 2022-05-09 10:44:43 -05:00
Tusooa Zhu f3b7ee7836
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-05-09 10:44:43 -05:00
Tusooa Zhu ef1a046a2d
Make lint happy 2022-05-09 10:44:43 -05:00
Tusooa Zhu 2b8a625083
Add test for fallbacking to a general language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 3e5bfa03d0
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-05-09 10:44:43 -05:00
Tusooa Zhu 887720158f
Add changelog 2022-05-09 10:44:43 -05:00
Tusooa Zhu d3c818700f
Document API addition 2022-05-09 10:44:43 -05:00
Tusooa Zhu d831e57089
Allow user to register with custom language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 4157fe8e11
Allow update_credentials to update User.language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 8e1d3b5591
Send emails i18n'd using backend-stored user language 2022-05-09 10:44:43 -05:00
Tusooa Zhu a4d9251cab
Make all emails translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 7e05ec625d
Fix digest test 2022-05-09 10:44:43 -05:00
Tusooa Zhu dff9733943
Make mail and mailer translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu c7dff104ea
Make static fe translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu be33d11d69
Fix tests 2022-05-09 10:44:43 -05:00
Tusooa Zhu 87d54a0ab0
Make mfa pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 5c674211ea
Make oauth pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 0ffb91a2d3
Use proper lang attributes in htmls 2022-05-09 10:44:43 -05:00
Tusooa Zhu 95b905443c
Make tag feed translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 7b467dd955
Make password reset pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu ece007c6f9
Make lint happy 2022-05-09 10:44:43 -05:00
Tusooa Zhu 4446fc675b
Extract translatable text 2022-05-09 10:44:43 -05:00
Tusooa Zhu 304fad22b2
Make remote follow pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 2e69846e65
Prefer userLanguage cookie over Accept-Language header in detecting locale
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-05-09 10:44:43 -05:00
sleepycrow fd551b84b2
Update Caddyfile to Caddy v2 2022-05-09 10:44:43 -05:00
Ilja e49d8aba86
After code review
Use patern matching to see if someone was superuser before
2022-05-09 10:44:43 -05:00
Ilja d3ad9e927d
Delete report notifs when demoting from superuser
When someone isn't a superuser any more, they shouldn't see the reporsts any more either.
Here we delete the report notifications from a user when that user gets updated from being a superuser to a non-superuser.
2022-05-09 10:44:43 -05:00
Sam Therapy 05facac1a4
ReactToLike: add missing emojis, make the log clear 2022-03-19 18:39:10 +01:00
Sam Therapy 5e7e56e305
Add a react to like MRF
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-03-19 18:09:22 +01:00
Haelwenn (lanodan) Monnier 46da3d8168
mix: Check .git presence 2022-03-19 16:57:39 +01:00
Ilja 28c37dc386
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-03-19 16:57:38 +01:00
feld 9d518b65fd
Revert "Merge branch 'revert/notice-routes' into 'develop'"
This reverts merge request !3576
2022-03-05 00:34:01 +01:00
Sean King 2842684e81
Revert "Merge branch 'notice-routes' into 'develop'" 2022-03-05 00:34:00 +01:00
Sam Therapy a665b34769
Add unicode 14 support
and add a test with a unicode 14 emoji
2022-02-21 17:27:22 -06:00
Sam Therapy 12d45faa0d
Unicode 14.0 support 2022-02-21 12:16:06 -06:00
Sam Therapy 0fb1684fb7
Update copyright, also
https://codeberg.org/newroma-dev/newroma/pulls/12

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-02-12 11:53:32 -06:00
Sam Therapy 33c0a207ba
Shove all changes in one commit
Moderators: reorganize :admin_api pipeline in Router

Add block notify from Soapbox
2022-02-12 11:53:32 -06:00
Alex Gleason fa8e2ffa3f Merge branch 'max_media_attachments' into 'develop'
Allow specifying max media attachment count

Closes #2665

See merge request pleroma/pleroma!3630
2022-02-06 18:25:14 +00:00
marcin mikołajczak e473bcf7a0 Max media attachment count
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-06 17:41:15 +01:00
Alex Gleason 60deddb7e5 Merge branch 'fix-tests-warn' into 'develop'
Fix tests matching on "warn"

See merge request pleroma/pleroma!3629
2022-02-02 19:57:03 +00:00
Alex Gleason 7c044a1841
FilterControllerTest: tag erratic test 2022-02-02 13:10:39 -06:00