Commit graph

6274 commits

Author SHA1 Message Date
Haelwenn
a15b45a589 Merge branch 'bugfix/mime-validation-no-list' into 'develop'
Bugfix: Validate mediaType only by it's format

See merge request pleroma/pleroma!3597
2022-07-03 21:04:41 +00:00
Haelwenn
6b937d1473 Merge branch 'from/upstream-develop/tusooa/server-announcements' into 'develop'
Server announcements (1st pass)

See merge request pleroma/pleroma!3643
2022-07-03 20:58:20 +00:00
a74ce2d77a
StealEmojiPolicy: fix String rejected_shortcodes
* rejected_shortcodes is defined as a list of strings in the
  configuration description. As such, database-based configuration was
  led to handle those settings as strings, and not as the actually
  expected type, Regex.
* This caused each message passing through this MRF, if a rejected
  shortcode was set and the emoji did not exist already on the instance,
  to fail federating, as an exception was raised, swiftly caught and
  mostly silenced.
* This commit fixes the issue by introducing new behavior: strings are
  now handled as perfect matches for an emoji shortcode (meaning that if
  the emoji-to-be-pulled's shortcode is in the blacklist, it will be
  rejected), while still supporting Regex types as before.
2022-05-18 21:25:10 +02:00
Haelwenn
4605efe272 Merge branch 'improve_anti_followbot_policy' into 'develop'
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy

Closes #2561

See merge request pleroma/pleroma!3498
2022-05-08 18:10:40 +00:00
Ilja
a8093732bd Also use actor_type to determine if an account is a bot in antiFollowbotPolicy 2022-05-08 18:10:40 +00:00
Tusooa Zhu
57c030a0a7 Skip cache when /objects or /activities is authenticated
Ref: fix-local-public
2022-05-06 10:23:26 +02:00
Tusooa Zhu
e2d24eda57 Allow to skip cache in Cache plug
Ref: fix-local-public
2022-05-06 10:23:26 +02:00
Tusooa Zhu
be08d9305b
Fix incorrect fallback when English is set to first language 2022-04-17 22:39:52 -04:00
Tusooa Zhu
7d1dae3bef
Restrict mastodon api announcements to logged-in users only 2022-04-02 02:25:13 -04:00
Haelwenn
d7c53da77a Merge branch 'from/upstream-develop/tusooa/translate-pages' into 'develop'
Translate backend-rendered pages

See merge request pleroma/pleroma!3634
2022-03-20 18:14:37 +00:00
Haelwenn (lanodan) Monnier
83338c25a5 Transmogrifier: Use validating regex for "mediaType" 2022-03-17 22:37:26 +01:00
Haelwenn (lanodan) Monnier
030183b35f AttachmentValidator: Use custom ecto type and regex for "mediaType" 2022-03-17 22:37:26 +01:00
Tusooa Zhu
ebcda5265b
Format announcements into html 2022-03-08 23:00:51 -05:00
Tusooa Zhu
eb1a29640f
Add pagination to AdminAPI.AnnouncementController.index 2022-03-08 21:26:05 -05:00
Tusooa Zhu
11a1996bf5
Implement update announcement admin api 2022-03-08 20:55:41 -05:00
Tusooa Zhu
881179ec72
Remove GET /api/v1/announcements/:id 2022-03-08 19:22:28 -05:00
Tusooa Zhu
d569694ae9
Show only visible announcements in MastodonAPI 2022-03-08 19:20:29 -05:00
Tusooa Zhu
cf8334dbc1
Add starts_at, ends_at and all_day parameters 2022-03-08 19:12:01 -05:00
Tusooa Zhu
009817c9ee
Correct docstring for AnnouncementController.show 2022-03-08 17:00:49 -05:00
Tusooa Zhu
2b39b36e49
Implement POST /api/v1/announcements/:id/dismiss 2022-03-08 16:59:20 -05:00
Tusooa Zhu
aa1fff279e
Implement GET /api/v1/announcements/:id 2022-03-08 16:19:35 -05:00
Tusooa Zhu
5169ad8f14
Implement announcement read relationships 2022-03-08 13:09:49 -05:00
Tusooa Zhu
c867d23250
Fill properties of announcements from Mastodon API spec 2022-03-08 09:35:35 -05:00
Tusooa Zhu
d7af67012f
Implement first pass of announcement admin api
CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/2836
CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/1470
2022-03-08 01:01:27 -05:00
Tusooa Zhu
79ccb6b999
Support fallbacking to other languages 2022-03-06 11:43:31 -05:00
Tusooa Zhu
cd42e2bed0
Lint 2022-03-03 09:49:55 -05:00
Tusooa Zhu
aca11fb70e
Support multiple locales from userLanguage cookie 2022-03-03 02:31:36 -05:00
Tusooa Zhu
7ea330b4fe
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-03-03 02:03:44 -05:00
Tusooa Zhu
d3f3f30c6a
Make lint happy 2022-03-02 22:56:19 -05:00
Tusooa Zhu
8de573b047
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-03-02 19:59:11 -05:00
Tusooa Zhu
e644f8dea5
Allow user to register with custom language 2022-03-02 01:41:13 -05:00
Tusooa Zhu
396f036b13
Allow update_credentials to update User.language 2022-03-02 00:58:02 -05:00
Tusooa Zhu
0149ea4538
Send emails i18n'd using backend-stored user language 2022-03-01 22:19:13 -05:00
Tusooa Zhu
1deab33fb0
Make mail and mailer translatable 2022-03-01 19:17:11 -05:00
Tusooa Zhu
32e4aa42d3
Make static fe translatable 2022-03-01 18:48:08 -05:00
Tusooa Zhu
fdbf9b06e5
Fix tests 2022-02-28 11:23:15 -05:00
Tusooa Zhu
cadca083ea
Make mfa pages translatable 2022-02-28 11:07:28 -05:00
Tusooa Zhu
50a316cd63
Make oauth pages translatable 2022-02-28 02:11:57 -05:00
Tusooa Zhu
f63d9b7835
Use proper lang attributes in htmls 2022-02-28 01:28:23 -05:00
Tusooa Zhu
0cc6557716
Make tag feed translatable 2022-02-28 01:13:39 -05:00
Tusooa Zhu
1edbda39e1
Make password reset pages translatable 2022-02-28 01:04:04 -05:00
Sean King
17aa3644be
Copyright bump for 2022 2022-02-25 23:11:42 -07:00
Tusooa Zhu
9f4c5743e8
Make lint happy 2022-02-21 19:12:32 -05:00
Tusooa Zhu
a867107437
Make remote follow pages translatable 2022-02-21 18:43:45 -05:00
Tusooa Zhu
0fd3695b9c
Prefer userLanguage cookie over Accept-Language header in detecting locale
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-02-21 18:02:19 -05: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
marcin mikołajczak
f8f2a17754 Birthdays: Fix outgoing federation of birth dates
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-01 12:00:26 +01:00
Alex Gleason
3bf257171f
ForceMentionsInContent: improve display of Markdown posts 2022-01-27 14:15:06 -06:00
Alex Gleason
27cb3d6273
ForceMentionsInContent: don't apply it to top-level posts 2022-01-26 21:24:26 -06:00
bot
a4de79ced0 ForceBotUnlistedPolicy: fix to stop unlisting my posts >:( 2022-01-26 22:53:02 +00:00