akkoma
2 years agoMerge pull request 'Merge search behaviour change, and refactor elasticsearch' (...
floatingghost [Thu, 30 Jun 2022 16:55:30 +0000 (16:55 +0000)]
Merge pull request 'Merge search behaviour change, and refactor elasticsearch' (#28) from elasticsearch-refactor into develop

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/28

2 years agoAdd documentation for ES search
FloatingGhost [Thu, 30 Jun 2022 16:36:57 +0000 (17:36 +0100)]
Add documentation for ES search

2 years agoAdd elasticsearch tests
FloatingGhost [Thu, 30 Jun 2022 15:53:21 +0000 (16:53 +0100)]
Add elasticsearch tests

2 years agoRefactor ES on top of search behaviour
FloatingGhost [Thu, 30 Jun 2022 15:28:31 +0000 (16:28 +0100)]
Refactor ES on top of search behaviour

2 years agoUpdate meilisearch docs
Ekaterina Vaartis [Wed, 23 Mar 2022 08:36:01 +0000 (11:36 +0300)]
Update meilisearch docs

2 years agoChange updateId to uid because apparently that's the new name
Ekaterina Vaartis [Tue, 22 Mar 2022 17:45:49 +0000 (20:45 +0300)]
Change updateId to uid because apparently that's the new name

2 years agoChange the meilisearch key auth to conform to 0.25.0
Ekaterina Vaartis [Tue, 22 Mar 2022 17:29:17 +0000 (20:29 +0300)]
Change the meilisearch key auth to conform to 0.25.0

2 years agoActually, unlisted posts are indexed
Ekaterina Vaartis [Sat, 22 Jan 2022 18:09:53 +0000 (21:09 +0300)]
Actually, unlisted posts are indexed

2 years agoChange search_indexing = 10 and retries for indexing = 2
Ekaterina Vaartis [Sat, 22 Jan 2022 14:17:43 +0000 (17:17 +0300)]
Change search_indexing = 10 and retries for indexing = 2

2 years agoDon't try removing deleted users and such from index as posts
Ekaterina Vaartis [Sat, 22 Jan 2022 13:52:06 +0000 (16:52 +0300)]
Don't try removing deleted users and such from index as posts

2 years agoFix meilisearch tests and jobs for oban
Ekaterina Vaartis [Sat, 22 Jan 2022 13:31:32 +0000 (16:31 +0300)]
Fix meilisearch tests and jobs for oban

2 years agoUse oban for search indexing
Ekaterina Vaartis [Sat, 22 Jan 2022 12:23:11 +0000 (15:23 +0300)]
Use oban for search indexing

2 years agoAdd a search backend behaviour
Ekaterina Vaartis [Mon, 20 Dec 2021 19:38:50 +0000 (22:38 +0300)]
Add a search backend behaviour

2 years agoAdd description for initial_indexing_chunk_size
Ekaterina Vaartis [Mon, 20 Dec 2021 16:27:22 +0000 (19:27 +0300)]
Add description for initial_indexing_chunk_size

2 years agoDon't support meilisearch < 0.24.0, since it breaks things
Ekaterina Vaartis [Mon, 20 Dec 2021 16:05:59 +0000 (19:05 +0300)]
Don't support meilisearch < 0.24.0, since it breaks things

2 years agoMake chunk size configurable
Ekaterina Vaartis [Mon, 20 Dec 2021 15:48:52 +0000 (18:48 +0300)]
Make chunk size configurable

2 years agoUpdate search.md documentation with meilisearch indexing steps
Ekaterina Vaartis [Mon, 20 Dec 2021 15:16:33 +0000 (18:16 +0300)]
Update search.md documentation with meilisearch indexing steps

2 years agoAdd config description for meilisearch
Ekaterina Vaartis [Mon, 20 Dec 2021 14:46:23 +0000 (17:46 +0300)]
Add config description for meilisearch

2 years agoImplement suggestions from the Meilisearch MR
Ekaterina Vaartis [Mon, 22 Nov 2021 18:39:54 +0000 (21:39 +0300)]
Implement suggestions from the Meilisearch MR

- Index unlisted posts
- Move version check outside of the streaming and only do it once
- Use a PUT request instead of checking manually if there is need to insert
- Add error handling, sort of

2 years agoRename Activity.Search to Search.DatabaseSearch
Ekaterina Vaartis [Wed, 17 Nov 2021 19:29:49 +0000 (22:29 +0300)]
Rename Activity.Search to Search.DatabaseSearch

2 years agoRename search.ex to database_search.ex and add search/2
Ekaterina Vaartis [Tue, 16 Nov 2021 18:54:26 +0000 (21:54 +0300)]
Rename search.ex to database_search.ex and add search/2

2 years agoStyle fixes
Ekaterina Vaartis [Sun, 14 Nov 2021 18:42:18 +0000 (21:42 +0300)]
Style fixes

2 years agoMove the search.ex file so credo doesn't complain
Ekaterina Vaartis [Sun, 14 Nov 2021 17:24:05 +0000 (20:24 +0300)]
Move the search.ex file so credo doesn't complain

2 years agoFix a typo in search docs
Ekaterina Vaartis [Sun, 14 Nov 2021 17:15:12 +0000 (20:15 +0300)]
Fix a typo in search docs

2 years agoSupport reindexing meilisearch >=0.24.0
Ekaterina Vaartis [Sat, 13 Nov 2021 12:07:51 +0000 (15:07 +0300)]
Support reindexing meilisearch >=0.24.0

It has has a different error code key

2 years agoAdd a reindex option
Ekaterina Vaartis [Wed, 10 Nov 2021 18:25:12 +0000 (21:25 +0300)]
Add a reindex option

Signed-off-by: Ekaterina Vaartis <vaartis@kotobank.ch>
2 years agoOnly add local posts to index in activity_pub
Ekaterina Vaartis [Fri, 29 Oct 2021 18:04:59 +0000 (21:04 +0300)]
Only add local posts to index in activity_pub

Remote ones are already added in another place

2 years agoSet content-type to application/json
Ekaterina Vaartis [Fri, 29 Oct 2021 10:58:24 +0000 (13:58 +0300)]
Set content-type to application/json

2 years agoModify some meilisearch variables
Ekaterina Vaartis [Thu, 28 Oct 2021 21:38:00 +0000 (00:38 +0300)]
Modify some meilisearch variables

2 years agoUse proper deleted object for removing from index
Ekaterina Vaartis [Tue, 12 Oct 2021 16:34:57 +0000 (19:34 +0300)]
Use proper deleted object for removing from index

2 years agoDon't try removing from index again in common_api
Ekaterina Vaartis [Tue, 12 Oct 2021 16:17:37 +0000 (19:17 +0300)]
Don't try removing from index again in common_api

It's already removed in the side effects of the pipeline

2 years agoAdd more documentation about rum to meilisearch docs
Ekaterina Vaartis [Tue, 12 Oct 2021 16:14:39 +0000 (19:14 +0300)]
Add more documentation about rum to meilisearch docs

2 years agoMove add_to_index / remove_from_index to Pleroma.Actitivy.Search
Ekaterina Vaartis [Fri, 8 Oct 2021 09:24:37 +0000 (12:24 +0300)]
Move add_to_index / remove_from_index to Pleroma.Actitivy.Search

2 years agoReorder ranking rules for (maybe) better results
Ekaterina Vaartis [Sat, 28 Aug 2021 12:59:13 +0000 (15:59 +0300)]
Reorder ranking rules for (maybe) better results

2 years agoAdd private_key: nil to default meilisearch options
Ekaterina Vaartis [Mon, 23 Aug 2021 20:52:37 +0000 (23:52 +0300)]
Add private_key: nil to default meilisearch options

2 years agoAdd tests for local post indexing for meilisearch
Ekaterina Vaartis [Mon, 23 Aug 2021 20:52:21 +0000 (23:52 +0300)]
Add tests for local post indexing for meilisearch

2 years agoFix activity being passed to objec_to_search_data
Ekaterina Vaartis [Mon, 23 Aug 2021 18:15:15 +0000 (21:15 +0300)]
Fix activity being passed to objec_to_search_data

2 years agoAdd search/meilisearch documentation
Ekaterina Vaartis [Mon, 23 Aug 2021 17:27:16 +0000 (20:27 +0300)]
Add search/meilisearch documentation

2 years agoAdd the meilisearch.stats command
Ekaterina Vaartis [Mon, 23 Aug 2021 17:21:46 +0000 (20:21 +0300)]
Add the meilisearch.stats command

2 years agoAdd a message with a count of posts to index
Ekaterina Vaartis [Mon, 23 Aug 2021 17:02:34 +0000 (20:02 +0300)]
Add a message with a count of posts to index

2 years agoImplement meilisearch auth
Ekaterina Vaartis [Mon, 23 Aug 2021 16:35:21 +0000 (19:35 +0300)]
Implement meilisearch auth

2 years agoMake indexing logs rewrite themselves
Ekaterina Vaartis [Sun, 22 Aug 2021 20:47:43 +0000 (23:47 +0300)]
Make indexing logs rewrite themselves

2 years agoRework task indexing to share code with the main module
Ekaterina Vaartis [Sun, 22 Aug 2021 19:53:18 +0000 (22:53 +0300)]
Rework task indexing to share code with the main module

The code in the main module now scrubs new posts too

2 years agoAdjust content indexing to skip more unneeded stuff
Ekaterina Vaartis [Sun, 22 Aug 2021 16:38:03 +0000 (19:38 +0300)]
Adjust content indexing to skip more unneeded stuff

2 years agoMark only content as searchable for meilisearch
Ekaterina Vaartis [Sun, 22 Aug 2021 15:47:41 +0000 (18:47 +0300)]
Mark only content as searchable for meilisearch

2 years agoAlso index incoming federated posts
Ekaterina Vaartis [Sun, 22 Aug 2021 13:37:52 +0000 (16:37 +0300)]
Also index incoming federated posts

2 years agoMake the chunk size smaller
Ekaterina Vaartis [Mon, 16 Aug 2021 22:37:43 +0000 (01:37 +0300)]
Make the chunk size smaller

2 years agoUse content instead of source and scrub it
Ekaterina Vaartis [Mon, 16 Aug 2021 21:57:53 +0000 (00:57 +0300)]
Use content instead of source and scrub it

2 years agoTweak search ordering to hopefully return newer results
Ekaterina Vaartis [Mon, 16 Aug 2021 21:30:14 +0000 (00:30 +0300)]
Tweak search ordering to hopefully return newer results

2 years agoMake meilisearch sort on publish date converted to unix time
Ekaterina Vaartis [Mon, 16 Aug 2021 21:06:32 +0000 (00:06 +0300)]
Make meilisearch sort on publish date converted to unix time

2 years agoMake the indexing batch differently and more, show number indexed
Ekaterina Vaartis [Mon, 16 Aug 2021 19:30:56 +0000 (22:30 +0300)]
Make the indexing batch differently and more, show number indexed

2 years agoEnsure only indexing public posts and implement clearing and delete
Ekaterina Vaartis [Mon, 16 Aug 2021 19:24:31 +0000 (22:24 +0300)]
Ensure only indexing public posts and implement clearing and delete

2 years agoAdd logging to milisiearch index and make it use desc(id)
Ekaterina Vaartis [Mon, 16 Aug 2021 07:18:01 +0000 (10:18 +0300)]
Add logging to milisiearch index and make it use desc(id)

2 years agoInitial meilisearch implementation, doesn't delete posts yet
Ekaterina Vaartis [Sun, 15 Aug 2021 18:53:04 +0000 (21:53 +0300)]
Initial meilisearch implementation, doesn't delete posts yet

2 years agoInstruct users to run 'git pull' as the pleroma user
lewdthewides [Thu, 12 May 2022 16:02:58 +0000 (16:02 +0000)]
Instruct users to run 'git pull' as the pleroma user

2 years agoStealEmojiPolicy: fix String rejected_shortcodes
Hélène [Wed, 18 May 2022 19:25:10 +0000 (21:25 +0200)]
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.

2 years agoAlso use actor_type to determine if an account is a bot in antiFollowbotPolicy
Ilja [Sun, 8 May 2022 18:10:40 +0000 (18:10 +0000)]
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy

2 years agoSkip cache when /objects or /activities is authenticated
Tusooa Zhu [Thu, 5 May 2022 23:20:32 +0000 (19:20 -0400)]
Skip cache when /objects or /activities is authenticated

Ref: fix-local-public

2 years agoAllow to skip cache in Cache plug
Tusooa Zhu [Thu, 5 May 2022 22:39:34 +0000 (18:39 -0400)]
Allow to skip cache in Cache plug

Ref: fix-local-public

2 years agoFix incorrect fallback when English is set to first language
Tusooa Zhu [Mon, 18 Apr 2022 02:39:52 +0000 (22:39 -0400)]
Fix incorrect fallback when English is set to first language

2 years agoFix eratic test for POST /api/pleroma/admin/reports/:id/notes
Ilja [Tue, 5 Apr 2022 11:21:09 +0000 (13:21 +0200)]
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

2 years agoSupport fallbacking to other languages
Tusooa Zhu [Sun, 6 Mar 2022 16:43:31 +0000 (11:43 -0500)]
Support fallbacking to other languages

2 years agoLint
Tusooa Zhu [Thu, 3 Mar 2022 14:40:18 +0000 (09:40 -0500)]
Lint

2 years agoSupport multiple locales from userLanguage cookie
Tusooa Zhu [Thu, 3 Mar 2022 07:31:36 +0000 (02:31 -0500)]
Support multiple locales from userLanguage cookie

2 years agoSupport multiple locales formally
Tusooa Zhu [Thu, 3 Mar 2022 07:03:44 +0000 (02:03 -0500)]
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

2 years agoMake lint happy
Tusooa Zhu [Thu, 3 Mar 2022 03:56:19 +0000 (22:56 -0500)]
Make lint happy

2 years agoAdd test for fallbacking to a general language
Tusooa Zhu [Thu, 3 Mar 2022 01:04:30 +0000 (20:04 -0500)]
Add test for fallbacking to a general language

2 years agoFallback to a variant if the language in general is not supported
Tusooa Zhu [Thu, 3 Mar 2022 00:59:11 +0000 (19:59 -0500)]
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.

2 years agoAdd changelog
Tusooa Zhu [Wed, 2 Mar 2022 14:51:46 +0000 (09:51 -0500)]
Add changelog

2 years agoDocument API addition
Tusooa Zhu [Wed, 2 Mar 2022 14:47:51 +0000 (09:47 -0500)]
Document API addition

2 years agoAllow user to register with custom language
Tusooa Zhu [Wed, 2 Mar 2022 06:41:13 +0000 (01:41 -0500)]
Allow user to register with custom language

2 years agoAllow update_credentials to update User.language
Tusooa Zhu [Wed, 2 Mar 2022 05:58:02 +0000 (00:58 -0500)]
Allow update_credentials to update User.language

2 years agoSend emails i18n'd using backend-stored user language
Tusooa Zhu [Wed, 2 Mar 2022 02:24:17 +0000 (21:24 -0500)]
Send emails i18n'd using backend-stored user language

2 years agoMake all emails translatable
Tusooa Zhu [Wed, 2 Mar 2022 01:29:26 +0000 (20:29 -0500)]
Make all emails translatable

2 years agoFix digest test
Tusooa Zhu [Wed, 2 Mar 2022 01:27:45 +0000 (20:27 -0500)]
Fix digest test

2 years agoMake mail and mailer translatable
Tusooa Zhu [Wed, 2 Mar 2022 00:17:11 +0000 (19:17 -0500)]
Make mail and mailer translatable

2 years agoMake static fe translatable
Tusooa Zhu [Tue, 1 Mar 2022 23:48:08 +0000 (18:48 -0500)]
Make static fe translatable

2 years agoFix tests
Tusooa Zhu [Mon, 28 Feb 2022 16:23:15 +0000 (11:23 -0500)]
Fix tests

2 years agoMake mfa pages translatable
Tusooa Zhu [Mon, 28 Feb 2022 16:07:28 +0000 (11:07 -0500)]
Make mfa pages translatable

2 years agoMake oauth pages translatable
Tusooa Zhu [Mon, 28 Feb 2022 07:11:57 +0000 (02:11 -0500)]
Make oauth pages translatable

2 years agoUse proper lang attributes in htmls
Tusooa Zhu [Mon, 28 Feb 2022 06:28:23 +0000 (01:28 -0500)]
Use proper lang attributes in htmls

2 years agoMake tag feed translatable
Tusooa Zhu [Mon, 28 Feb 2022 06:13:39 +0000 (01:13 -0500)]
Make tag feed translatable

2 years agoMake password reset pages translatable
Tusooa Zhu [Mon, 28 Feb 2022 06:04:04 +0000 (01:04 -0500)]
Make password reset pages translatable

2 years agoMake lint happy
Tusooa Zhu [Tue, 22 Feb 2022 00:12:32 +0000 (19:12 -0500)]
Make lint happy

2 years agoExtract translatable text
Tusooa Zhu [Mon, 21 Feb 2022 23:44:36 +0000 (18:44 -0500)]
Extract translatable text

2 years agoMake remote follow pages translatable
Tusooa Zhu [Mon, 21 Feb 2022 23:42:25 +0000 (18:42 -0500)]
Make remote follow pages translatable

2 years agoPrefer userLanguage cookie over Accept-Language header in detecting locale
Tusooa Zhu [Mon, 21 Feb 2022 22:54:18 +0000 (17:54 -0500)]
Prefer userLanguage cookie over Accept-Language header in detecting locale

https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60

2 years agoAfter code review
Ilja [Mon, 7 Mar 2022 13:00:42 +0000 (14:00 +0100)]
After code review

Use patern matching to see if someone was superuser before

2 years agoDelete report notifs when demoting from superuser
Ilja [Sun, 6 Mar 2022 16:36:30 +0000 (17:36 +0100)]
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.

2 years agomix: Check .git presence
Haelwenn (lanodan) Monnier [Fri, 25 Feb 2022 09:31:42 +0000 (10:31 +0100)]
mix: Check .git presence

2 years agoFix test get_user_apps/1
Ilja [Tue, 22 Feb 2022 17:56:26 +0000 (18:56 +0100)]
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 cb2a072e6252b7c3f6473f7cfd1af5c0ec732d7b

2 years agoAdd unicode 14 support
Sam Therapy [Mon, 21 Feb 2022 18:28:33 +0000 (12:28 -0600)]
Add unicode 14 support
and add a test with a unicode 14 emoji

2 years agodon't enable static-fe
FloatingGhost [Wed, 29 Jun 2022 11:16:00 +0000 (12:16 +0100)]
don't enable static-fe

2 years agore-add gopher to URLs, fix markdown
FloatingGhost [Wed, 29 Jun 2022 11:12:48 +0000 (12:12 +0100)]
re-add gopher to URLs, fix markdown

2 years agoUpdate README, add migration docs
FloatingGhost [Wed, 29 Jun 2022 11:05:59 +0000 (12:05 +0100)]
Update README, add migration docs

2 years agoAdd visibility check in context path (#26)
floatingghost [Wed, 29 Jun 2022 09:33:57 +0000 (09:33 +0000)]
Add visibility check in context path (#26)

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/26

2 years agoMerge pull request 'Purge gopher frontend' (#24) from purge-gopher into develop
floatingghost [Mon, 27 Jun 2022 16:43:37 +0000 (16:43 +0000)]
Merge pull request 'Purge gopher frontend' (#24) from purge-gopher into develop

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/24

2 years agoPurge gopher frontend
FloatingGhost [Mon, 27 Jun 2022 16:31:16 +0000 (17:31 +0100)]
Purge gopher frontend

2 years agoPurge SSH frontend (#23)
floatingghost [Mon, 27 Jun 2022 11:32:06 +0000 (11:32 +0000)]
Purge SSH frontend (#23)

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/23

2 years agoMerge pull request 'Allow for embedding object data in publish' (#16) from undo-emoji...
floatingghost [Sat, 25 Jun 2022 17:45:38 +0000 (17:45 +0000)]
Merge pull request 'Allow for embedding object data in publish' (#16) from undo-emoji-remote into develop

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/16