mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-05 20:53:15 -06:00
webpush.Sender: take type converter as ctor param
This commit is contained in:
parent
b9f759d922
commit
d89f3ec8f1
4 changed files with 9 additions and 6 deletions
|
|
@ -25,6 +25,7 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/httpclient"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/state"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||
)
|
||||
|
||||
// Sender can send Web Push notifications.
|
||||
|
|
@ -39,7 +40,7 @@ type Sender interface {
|
|||
}
|
||||
|
||||
// NewSender creates a new sender from an HTTP client, DB, and worker pool.
|
||||
func NewSender(httpClient *httpclient.Client, state *state.State) Sender {
|
||||
func NewSender(httpClient *httpclient.Client, state *state.State, converter *typeutils.Converter) Sender {
|
||||
return NewRealSender(
|
||||
&http.Client{
|
||||
Transport: >sHTTPClientRoundTripper{
|
||||
|
|
@ -48,5 +49,6 @@ func NewSender(httpClient *httpclient.Client, state *state.State) Sender {
|
|||
// Other fields are already set on the http.Client inside the httpclient.Client.
|
||||
},
|
||||
state,
|
||||
converter,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue