EnsureRePrepend breaks chat
Chat is unable to be sent if the MRF policy EnsureRePrepend
is enabled, with the error being:
mix[16127]: 00:41:44.894 request_id=FiYfdOGdS53m_AMABIoS [error] Internal server error: %FunctionClauseError{args: nil, arity: 3, clauses: nil, function: :get, kind: nil, module: Access}
mix[16127]: 00:41:44.894 request_id=FiYfdOGdS53m_AMABIoS [info] Converted error :function_clause to 500 response
mix[16127]: 00:41:44.898 [error] #PID<0.3233.5> running Pleroma.Web.Endpoint (connection #PID<0.3232.5>, stream id 1) terminated
mix[16127]: Server: connected.cat6.network:80 (http)
mix[16127]: Request: POST /api/v1/pleroma/chats/9xYj3WnIqkaeV5zliK/messages
mix[16127]: ** (exit) an exception was raised:
mix[16127]: ** (FunctionClauseError) no function clause matching in Access.get/3
mix[16127]: (elixir 1.10.4) Access.get("https://cute.science/objects/639dc7ba-aa77-4aa8-a016-f99c42c5abaf", "inReplyTo", nil)
mix[16127]: (pleroma 2.0.50-2179-g93dbba9b-develop) lib/pleroma/web/activity_pub/mrf/ensure_re_prepended.ex:32: Pleroma.Web.ActivityPub.MRF.EnsureRePrepended.filter/1
mix[16127]: (elixir 1.10.4) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
mix[16127]: (pleroma 2.0.50-2179-g93dbba9b-develop) lib/pleroma/web/activity_pub/pipeline.ex:35: Pleroma.Web.ActivityPub.Pipeline.do_common_pipeline/2
mix[16127]: (ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:875: anonymous fn/3 in Ecto.Adapters.SQL.checkout_or_transaction/4
mix[16127]: (db_connection 2.2.2) lib/db_connection.ex:1427: DBConnection.run_transaction/4
mix[16127]: (pleroma 2.0.50-2179-g93dbba9b-develop) lib/pleroma/web/activity_pub/pipeline.ex:19: Pleroma.Web.ActivityPub.Pipeline.common_pipeline/2
mix[16127]: (pleroma 2.0.50-2179-g93dbba9b-develop) lib/pleroma/web/common_api/common_api.ex:50: Pleroma.Web.CommonAPI.post_chat_message/4
Disabling the MRF policy makes chat work again.