Allow to refresh instance outbox when they accept subscription

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-09-02 08:59:59 +02:00
parent c011a988a8
commit 489fd74545
20 changed files with 427 additions and 227 deletions

View File

@@ -30,11 +30,13 @@ defmodule Mobilizon.Service.Formatter.HTML do
`<h1>test</h1>next` thing becomes `test next` instead of `testnext`
"""
@spec strip_tags_and_insert_spaces(String.t()) :: String.t()
def strip_tags_and_insert_spaces(html) do
def strip_tags_and_insert_spaces(html) when is_binary(html) do
html
|> String.replace("</", " </")
|> strip_tags()
end
def strip_tags_and_insert_spaces(html), do: html
def filter_tags_for_oembed(html), do: Sanitizer.scrub(html, OEmbed)
end

View File

@@ -37,6 +37,8 @@ defmodule Mobilizon.Service.Workers.Helper do
queue: unquote(queue),
max_attempts: 1
alias Oban.Job
def enqueue(operation, params, worker_args \\ []) do
params = Map.merge(%{"op" => operation}, params)
queue_atom = String.to_existing_atom(unquote(queue))