Ekaterina Vaartis
0802c0666b
Move add_to_index / remove_from_index to Pleroma.Actitivy.Search
2022-06-29 20:48:44 +01:00
Ekaterina Vaartis
5ed1759091
Reorder ranking rules for (maybe) better results
2022-06-29 20:48:44 +01:00
Ekaterina Vaartis
b519726571
Add private_key: nil to default meilisearch options
2022-06-29 20:48:43 +01:00
Ekaterina Vaartis
88891e9d76
Add tests for local post indexing for meilisearch
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
41f3572152
Fix activity being passed to objec_to_search_data
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
375154e5de
Add search/meilisearch documentation
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
d1079f1aa3
Add the meilisearch.stats command
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
d5cc272a91
Add a message with a count of posts to index
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
dbf556cdcf
Implement meilisearch auth
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
5360cc1097
Make indexing logs rewrite themselves
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
0cf3654907
Rework task indexing to share code with the main module
...
The code in the main module now scrubs new posts too
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
117f525fd6
Adjust content indexing to skip more unneeded stuff
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
14ef6ce80f
Mark only content as searchable for meilisearch
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
b3401ba7bd
Also index incoming federated posts
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
52a872432d
Make the chunk size smaller
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
a586ce0ddd
Use content instead of source and scrub it
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
c3a04166a0
Tweak search ordering to hopefully return newer results
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
7b3701e6b9
Make meilisearch sort on publish date converted to unix time
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
abf82a63ec
Make the indexing batch differently and more, show number indexed
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
e5ac2ffa07
Ensure only indexing public posts and implement clearing and delete
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
41db5c8653
Add logging to milisiearch index and make it use desc(id)
2022-06-29 20:48:29 +01:00
Ekaterina Vaartis
e961cf2689
Initial meilisearch implementation, doesn't delete posts yet
2022-06-29 20:48:28 +01:00
lewdthewides
60eec9d0c5
Instruct users to run 'git pull' as the pleroma user
2022-06-29 20:47:45 +01:00
8f140deb8f
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-06-29 20:47:45 +01:00
Ilja
661d0ba481
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy
2022-06-29 20:47:44 +01:00
Tusooa Zhu
3fd87b6a75
Skip cache when /objects or /activities is authenticated
...
Ref: fix-local-public
2022-06-29 20:47:27 +01:00
Tusooa Zhu
932e5df19e
Allow to skip cache in Cache plug
...
Ref: fix-local-public
2022-06-29 20:47:26 +01:00
Tusooa Zhu
33d821256e
Fix incorrect fallback when English is set to first language
2022-06-29 20:47:10 +01:00
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
845e5769ce
Make lint happy
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
6e8123a330
Add changelog
2022-06-29 20:47:09 +01:00
Tusooa Zhu
dadc4eabf7
Document API addition
2022-06-29 20:46:52 +01:00
Tusooa Zhu
72bdb0640f
Allow user to register with custom language
2022-06-29 20:46:51 +01:00
Tusooa Zhu
1b77308644
Allow update_credentials to update User.language
2022-06-29 20:45:35 +01:00
Tusooa Zhu
7726148472
Send emails i18n'd using backend-stored user language
2022-06-29 20:45:19 +01:00
Tusooa Zhu
c301a95276
Make all emails translatable
2022-06-29 20:45:05 +01:00
Tusooa Zhu
4ed0a780b7
Fix digest test
2022-06-29 20:45:05 +01:00
Tusooa Zhu
63a0536d55
Make mail and mailer translatable
2022-06-29 20:45:05 +01:00
Tusooa Zhu
39cfecb188
Make static fe translatable
2022-06-29 20:45:05 +01:00
Tusooa Zhu
03aac29531
Fix tests
2022-06-29 20:45:05 +01:00
Tusooa Zhu
c6652fccae
Make mfa pages translatable
2022-06-29 20:45:03 +01:00
Tusooa Zhu
8f8d2abb12
Make oauth pages translatable
2022-06-29 20:44:48 +01:00
Tusooa Zhu
793922f1d8
Use proper lang attributes in htmls
2022-06-29 20:44:16 +01:00
Tusooa Zhu
ec57e3480c
Make tag feed translatable
2022-06-29 20:44:16 +01:00