Commit 465b547c authored by vaartis's avatar vaartis
Browse files

Remove unused "muted" parameter, use piping for mute/block fns

parent 092b1b14
......@@ -888,13 +888,13 @@ def blocks_import(%User{} = blocker, blocked_identifiers) when is_list(blocked_i
def mute(muter, %User{ap_id: ap_id} = muted) do
def mute(muter, %User{ap_id: ap_id}) do
mutes =["mutes"] || []
new_mutes = Enum.uniq([ap_id | mutes])
new_info = Map.put(, "mutes", new_mutes)
cs = User.info_changeset(muter, %{info: new_info})
User.info_changeset(muter, %{info: new_info})
|> update_and_set_cache()
def unmute(user, %{ap_id: ap_id}) do
......@@ -902,8 +902,8 @@ def unmute(user, %{ap_id: ap_id}) do
new_mutes = List.delete(mutes, ap_id)
new_info = Map.put(, "mutes", new_mutes)
cs = User.info_changeset(user, %{info: new_info})
User.info_changeset(user, %{info: new_info})
|> update_and_set_cache()
def block(blocker, %User{ap_id: ap_id} = blocked) do
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment