mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-01-11 09:45:25 +00:00
Transmogrifier: Don't modify attachments for chats.
This commit is contained in:
parent
d0bf8cfb8f
commit
03529f6a05
2 changed files with 5 additions and 0 deletions
|
@ -1114,6 +1114,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
||||||
Map.put(object, "attributedTo", attributed_to)
|
Map.put(object, "attributedTo", attributed_to)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: Revisit this
|
||||||
|
def prepare_attachments(%{"type" => "ChatMessage"} = object), do: object
|
||||||
|
|
||||||
def prepare_attachments(object) do
|
def prepare_attachments(object) do
|
||||||
attachments =
|
attachments =
|
||||||
object
|
object
|
||||||
|
|
|
@ -54,6 +54,8 @@ defmodule Pleroma.Web.CommonAPITest do
|
||||||
|
|
||||||
assert Chat.get(author.id, recipient.ap_id)
|
assert Chat.get(author.id, recipient.ap_id)
|
||||||
assert Chat.get(recipient.id, author.ap_id)
|
assert Chat.get(recipient.id, author.ap_id)
|
||||||
|
|
||||||
|
assert :ok == Pleroma.Web.Federator.perform(:publish, activity)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it reject messages over the local limit" do
|
test "it reject messages over the local limit" do
|
||||||
|
|
Loading…
Reference in a new issue