mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 22:26:15 -06:00
fix import cycle
This commit is contained in:
parent
f79c36084f
commit
611f5f790e
2 changed files with 23 additions and 5 deletions
|
|
@ -30,7 +30,9 @@ import (
|
|||
|
||||
// Sender can send Web Push notifications.
|
||||
type Sender interface {
|
||||
// Send queues up a notification for delivery to all of an account's Web Push subscriptions.
|
||||
|
||||
// Send queues up a notification for delivery to
|
||||
// all of an account's Web Push subscriptions.
|
||||
Send(
|
||||
ctx context.Context,
|
||||
notification *gtsmodel.Notification,
|
||||
|
|
@ -55,3 +57,12 @@ func NewSender(httpClient *httpclient.Client, state *state.State, converter *typ
|
|||
converter: converter,
|
||||
}
|
||||
}
|
||||
|
||||
// an internal function purely existing for the webpush test package to link to and use a custom http.Client{}.
|
||||
func newSenderWith(client *http.Client, state *state.State, converter *typeutils.Converter) Sender {
|
||||
return &realSender{
|
||||
httpClient: client,
|
||||
state: state,
|
||||
converter: converter,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue