Skip to content

Commit

Permalink
fix(notifier): fix discord webhooks not being sent due to wrong json …
Browse files Browse the repository at this point in the history
…format (#270)

* fix discord webhooks not being sent due to wrong json format (& adapting testcase 5 to new post body format)

* add changelog
  • Loading branch information
Sarsum authored Oct 30, 2024
1 parent cfc1ccc commit 39b5ecf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/sys-tests/testcase-5/body.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"username":"Notifier für test","avatar_url":"https://workflow.github.comstatic/media/favicon.svg","embed":[{"title":"Added Event2","description":"Event2\nThu 29. Aug 2024, 21:52 - 22:00\nLocation: Hamburg\n","color":65280,"footer":{}}]}
{"username":"Notifier für test","avatar_url":"https://workflow.github.comstatic/media/favicon.svg","embeds":[{"title":"Added Event2","description":"Event2\nThu 29. Aug 2024, 21:52 - 22:00\nLocation: Hamburg\n","color":65280,"footer":{}}]}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config.yml
config*.yml
!.github/sys-tests/*/config.yml
notifier-config.yml
notifier-data.yml
!.github/sys-tests/*/*-config.yml
data.yml
!.github/sys-tests/*/data.yml
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 2.0.0-beta.9.7

- fix: do not add X-WR-TIMEZONE to UTC timestamps
- fix: fix discord webhooks not being sent due to wrong json format
- dependency fix: read properties after component

# 2.0.0-beta.9.6
Expand Down
2 changes: 1 addition & 1 deletion cmd/ical-notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ type discordWebhook struct {
Username string `json:"username,omitempty"`
Avatar string `json:"avatar_url,omitempty"`
Content string `json:"content,omitempty"`
Embed []discordWebhookEmbed `json:"embed,omitempty"`
Embed []discordWebhookEmbed `json:"embeds,omitempty"`
}

type discordWebhookEmbed struct {
Expand Down

0 comments on commit 39b5ecf

Please sign in to comment.