Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into release/2.8.0
This commit is contained in:
commit
8c6b3d3ce6
12
CHANGELOG.md
12
CHANGELOG.md
@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
|
## 2.7.1
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Accept `application/activity+json` for requests to `/.well-known/nodeinfo`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Truncate remote user fields, avoids them getting rejected
|
||||||
|
- Improve the `FollowValidator` to successfully incoming activities with an errant `cc` field.
|
||||||
|
- Resolved edge case where the API can report you are following a user but the relationship is not fully established.
|
||||||
|
- The Swoosh email adapter for Mailgun was missing a new dependency on `:multipart`
|
||||||
|
- Fix Mastodon WebSocket authentication
|
||||||
|
|
||||||
## 2.7.0
|
## 2.7.0
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Truncate remote user fields, avoids them getting rejected
|
|
@ -1 +0,0 @@
|
|||||||
Improve the FollowValidator to successfully incoming activities with an errant cc field.
|
|
@ -1 +0,0 @@
|
|||||||
Resolved edge case where the API can report you are following a user but the relationship is not fully established.
|
|
@ -1 +0,0 @@
|
|||||||
The Swoosh email adapter for Mailgun was missing a new dependency on :multipart
|
|
@ -1 +0,0 @@
|
|||||||
Fix Mastodon WebSocket authentication
|
|
1
changelog.d/meilisearch-misc-fixes.fix
Normal file
1
changelog.d/meilisearch-misc-fixes.fix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Miscellaneous fixes for Meilisearch support
|
1
changelog.d/module-search-in-pleroma-ctl.fix
Normal file
1
changelog.d/module-search-in-pleroma-ctl.fix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix pleroma_ctl mix task calls sometimes not being found
|
@ -1 +0,0 @@
|
|||||||
Accept application/activity+json for requests to .well-known/nodeinfo
|
|
@ -9,7 +9,7 @@ defmodule Mix.Tasks.Pleroma.Search.Meilisearch do
|
|||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
|
||||||
import Pleroma.Search.Meilisearch,
|
import Pleroma.Search.Meilisearch,
|
||||||
only: [meili_post: 2, meili_put: 2, meili_get: 1, meili_delete: 1]
|
only: [meili_put: 2, meili_get: 1, meili_delete: 1]
|
||||||
|
|
||||||
def run(["index"]) do
|
def run(["index"]) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
@ -28,7 +28,7 @@ defmodule Mix.Tasks.Pleroma.Search.Meilisearch do
|
|||||||
end
|
end
|
||||||
|
|
||||||
{:ok, _} =
|
{:ok, _} =
|
||||||
meili_post(
|
meili_put(
|
||||||
"/indexes/objects/settings/ranking-rules",
|
"/indexes/objects/settings/ranking-rules",
|
||||||
[
|
[
|
||||||
"published:desc",
|
"published:desc",
|
||||||
@ -42,7 +42,7 @@ defmodule Mix.Tasks.Pleroma.Search.Meilisearch do
|
|||||||
)
|
)
|
||||||
|
|
||||||
{:ok, _} =
|
{:ok, _} =
|
||||||
meili_post(
|
meili_put(
|
||||||
"/indexes/objects/settings/searchable-attributes",
|
"/indexes/objects/settings/searchable-attributes",
|
||||||
[
|
[
|
||||||
"content"
|
"content"
|
||||||
|
@ -74,11 +74,14 @@ defmodule Pleroma.Frontend do
|
|||||||
|
|
||||||
new_file_path = Path.join(dest, path)
|
new_file_path = Path.join(dest, path)
|
||||||
|
|
||||||
new_file_path
|
path
|
||||||
|> Path.dirname()
|
|> Path.dirname()
|
||||||
|
|> then(&Path.join(dest, &1))
|
||||||
|> File.mkdir_p!()
|
|> File.mkdir_p!()
|
||||||
|
|
||||||
|
if not File.dir?(new_file_path) do
|
||||||
File.write!(new_file_path, data)
|
File.write!(new_file_path, data)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -16,17 +16,24 @@ defmodule Pleroma.ReleaseTasks do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def find_module(task) do
|
||||||
|
module_name =
|
||||||
|
task
|
||||||
|
|> String.split(".")
|
||||||
|
|> Enum.map(&String.capitalize/1)
|
||||||
|
|> then(fn x -> [Mix, Tasks, Pleroma] ++ x end)
|
||||||
|
|> Module.concat()
|
||||||
|
|
||||||
|
case Code.ensure_loaded(module_name) do
|
||||||
|
{:module, _} -> module_name
|
||||||
|
_ -> nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
defp mix_task(task, args) do
|
defp mix_task(task, args) do
|
||||||
Application.load(:pleroma)
|
Application.load(:pleroma)
|
||||||
{:ok, modules} = :application.get_key(:pleroma, :modules)
|
|
||||||
|
|
||||||
module =
|
module = find_module(task)
|
||||||
Enum.find(modules, fn module ->
|
|
||||||
module = Module.split(module)
|
|
||||||
|
|
||||||
match?(["Mix", "Tasks", "Pleroma" | _], module) and
|
|
||||||
String.downcase(List.last(module)) == task
|
|
||||||
end)
|
|
||||||
|
|
||||||
if module do
|
if module do
|
||||||
module.run(args)
|
module.run(args)
|
||||||
|
@ -122,6 +122,7 @@ defmodule Pleroma.Search.Meilisearch do
|
|||||||
# Only index public or unlisted Notes
|
# Only index public or unlisted Notes
|
||||||
if not is_nil(object) and object.data["type"] == "Note" and
|
if not is_nil(object) and object.data["type"] == "Note" and
|
||||||
not is_nil(object.data["content"]) and
|
not is_nil(object.data["content"]) and
|
||||||
|
not is_nil(object.data["published"]) and
|
||||||
(Pleroma.Constants.as_public() in object.data["to"] or
|
(Pleroma.Constants.as_public() in object.data["to"] or
|
||||||
Pleroma.Constants.as_public() in object.data["cc"]) and
|
Pleroma.Constants.as_public() in object.data["cc"]) and
|
||||||
object.data["content"] not in ["", "."] do
|
object.data["content"] not in ["", "."] do
|
||||||
|
19
test/pleroma/release_task_test.exs
Normal file
19
test/pleroma/release_task_test.exs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.ReleaseTaskTest do
|
||||||
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
|
alias Pleroma.ReleaseTasks
|
||||||
|
|
||||||
|
test "finding the module" do
|
||||||
|
task = "search.meilisearch"
|
||||||
|
assert Mix.Tasks.Pleroma.Search.Meilisearch == ReleaseTasks.find_module(task)
|
||||||
|
|
||||||
|
task = "user"
|
||||||
|
assert Mix.Tasks.Pleroma.User == ReleaseTasks.find_module(task)
|
||||||
|
|
||||||
|
refute ReleaseTasks.find_module("doesnt.exist")
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user