1503 fix ActivityPub publishing for self-signed CA certs
This commit is contained in:
parent
1217f8a777
commit
b8b2e895b0
|
@ -7,6 +7,7 @@ defmodule Mobilizon.Federation.ActivityPub.Publisher do
|
||||||
alias Mobilizon.Config
|
alias Mobilizon.Config
|
||||||
alias Mobilizon.Federation.ActivityPub.{Activity, Federator, Relay, Transmogrifier, Visibility}
|
alias Mobilizon.Federation.ActivityPub.{Activity, Federator, Relay, Transmogrifier, Visibility}
|
||||||
alias Mobilizon.Federation.HTTPSignatures.Signature
|
alias Mobilizon.Federation.HTTPSignatures.Signature
|
||||||
|
alias Mobilizon.Service.HTTP.ActivityPub, as: ActivityPubClient
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
import Mobilizon.Federation.ActivityPub.Utils,
|
import Mobilizon.Federation.ActivityPub.Utils,
|
||||||
|
@ -95,16 +96,16 @@ defmodule Mobilizon.Federation.ActivityPub.Publisher do
|
||||||
date: date
|
date: date
|
||||||
})
|
})
|
||||||
|
|
||||||
Tesla.post(
|
headers = [
|
||||||
inbox,
|
{"Content-Type", "application/activity+json"},
|
||||||
json,
|
{"signature", signature},
|
||||||
headers: [
|
{"digest", digest},
|
||||||
{"Content-Type", "application/activity+json"},
|
{"date", date}
|
||||||
{"signature", signature},
|
]
|
||||||
{"digest", digest},
|
|
||||||
{"date", date}
|
client = ActivityPubClient.client(headers: headers)
|
||||||
]
|
|
||||||
)
|
ActivityPubClient.post(client, inbox, json)
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec convert_followers_in_recipients(list(String.t())) :: {list(String.t()), list(String.t())}
|
@spec convert_followers_in_recipients(list(String.t())) :: {list(String.t()), list(String.t())}
|
||||||
|
|
Loading…
Reference in a new issue