mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(discord): remove hardcoded username (#323)
This commit is contained in:
parent
f63ace662a
commit
b5e033832a
1 changed files with 4 additions and 6 deletions
|
@ -15,9 +15,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type DiscordMessage struct {
|
type DiscordMessage struct {
|
||||||
Content interface{} `json:"content"`
|
Content interface{} `json:"content"`
|
||||||
Embeds []DiscordEmbeds `json:"embeds,omitempty"`
|
Embeds []DiscordEmbeds `json:"embeds,omitempty"`
|
||||||
Username string `json:"username"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type DiscordEmbeds struct {
|
type DiscordEmbeds struct {
|
||||||
|
@ -53,9 +52,8 @@ func NewDiscordSender(log logger.Logger, settings domain.Notification) domain.No
|
||||||
|
|
||||||
func (a *discordSender) Send(event domain.NotificationEvent, payload domain.NotificationPayload) error {
|
func (a *discordSender) Send(event domain.NotificationEvent, payload domain.NotificationPayload) error {
|
||||||
m := DiscordMessage{
|
m := DiscordMessage{
|
||||||
Content: nil,
|
Content: nil,
|
||||||
Embeds: []DiscordEmbeds{a.buildEmbed(event, payload)},
|
Embeds: []DiscordEmbeds{a.buildEmbed(event, payload)},
|
||||||
Username: "brr",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonData, err := json.Marshal(m)
|
jsonData, err := json.Marshal(m)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue