Commit 056305df authored by kaniini's avatar kaniini
Browse files

user: add helper function to fetch a user given only an ap_id (fix tests)

parent 3707a7fa
......@@ -527,6 +527,11 @@ def block(blocker, %User{ap_id: ap_id} = blocked) do
# helper to handle the block given only an actor's AP id
def block(blocker, %{ap_id: ap_id}) do
block(blocker, User.get_by_ap_id(ap_id))
def unblock(user, %{ap_id: ap_id}) do
blocks =["blocks"] || []
new_blocks = List.delete(blocks, ap_id)
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