From 24f06577109b1727c157142d59c1b6f16b6b9361 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Wed, 18 Aug 2021 23:23:47 +0200 Subject: [PATCH] Fix get_action_power_level for redact and kick actions --- lib/matrix_server/state_resolution/authorization.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/matrix_server/state_resolution/authorization.ex b/lib/matrix_server/state_resolution/authorization.ex index 317828b..d7f080d 100644 --- a/lib/matrix_server/state_resolution/authorization.ex +++ b/lib/matrix_server/state_resolution/authorization.ex @@ -204,10 +204,10 @@ defmodule MatrixServer.StateResolution.Authorization do defp get_action_power_level(:invite, _), do: 50 defp get_action_power_level(:ban, %{"ban" => pl}), do: pl defp get_action_power_level(:ban, _), do: 50 - # defp get_action_power_level(:redact, %{"redact" => pl}), do: pl - # defp get_action_power_level(:redact, _), do: 50 - # defp get_action_power_level(:kick, %{"kick" => pl}), do: pl - # defp get_action_power_level(:kick, _), do: 50 + defp get_action_power_level(:redact, %{"redact" => pl}), do: pl + defp get_action_power_level(:redact, _), do: 50 + defp get_action_power_level(:kick, %{"kick" => pl}), do: pl + defp get_action_power_level(:kick, _), do: 50 defp get_action_power_level({:event, %Event{type: type}}, %{"events" => events}) when is_map_key(events, type),