{:ok, activity, _} <- Pipeline.common_pipeline(emoji_react, local: true) do
{:ok, activity}
else
- _ ->
- {:error, dgettext("errors", "Could not add reaction emoji")}
+ _ -> {:error, dgettext("errors", "Could not add reaction emoji")}
end
end
|> check_expiry_date()
end
- def listen(user, data) do
- with {:ok, draft} <- ActivityDraft.listen(user, data) do
- ActivityPub.listen(draft.changes)
- end
- end
-
def post(user, %{status: _} = data) do
with {:ok, draft} <- ActivityDraft.create(user, data) do
ActivityPub.create(draft.changes, draft.preview?)
else
{what, result} = error ->
Logger.warn(
- "CommonAPI.remove_mute/2 failed. #{what}: #{result}, user_id: #{user_id}, activity_id: #{
- activity_id
- }"
+ "CommonAPI.remove_mute/2 failed. #{what}: #{result}, user_id: #{user_id}, activity_id: #{activity_id}"
)
{:error, error}