Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(discord): send multiple messages when exceeding limits #215

Merged
merged 1 commit into from May 25, 2022

Conversation

piksel
Copy link
Member

@piksel piksel commented Nov 23, 2021

Currently, the discord service sends notifications as one message with several embeds (one for each line). When there are more lines than the number of embeds permitted by the Discord API, they are simply omitted.
This will change that behaviour, so that it will instead send multiple messages when the limit is reached.

Ref containrrr/watchtower#1126

@piksel piksel added Service: Discord Related to the Discord Service Compatibility: Watchtower Related to the usage of Shoutrrr in Watchtower labels Nov 23, 2021
@codecov
Copy link

codecov bot commented Nov 23, 2021

Codecov Report

Merging #215 (a23d156) into main (ef1a21e) will increase coverage by 0.19%.
The diff coverage is 97.43%.

@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
+ Coverage   77.54%   77.73%   +0.19%     
==========================================
  Files          95       96       +1     
  Lines        2859     2866       +7     
==========================================
+ Hits         2217     2228      +11     
+ Misses        469      468       -1     
+ Partials      173      170       -3     
Impacted Files Coverage Δ
pkg/services/discord/discord.go 80.70% <94.44%> (-0.55%) ⬇️
pkg/services/discord/discord_json.go 90.47% <100.00%> (-2.12%) ⬇️
pkg/util/partition_message.go 94.00% <100.00%> (+4.00%) ⬆️
pkg/services/gotify/gotify_json.go 0.00% <0.00%> (ø)
pkg/util/jsonclient/jsonclient.go 71.11% <0.00%> (+0.65%) ⬆️
pkg/services/gotify/gotify_config.go 90.90% <0.00%> (+2.67%) ⬆️
pkg/services/gotify/gotify.go 85.71% <0.00%> (+8.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef1a21e...a23d156. Read the comment docs.

pkg/util/partition_message_test.go Outdated Show resolved Hide resolved
@piksel piksel changed the title feat: send multiple messages when exceeding limits feat(discord): send multiple messages when exceeding limits May 25, 2022
@piksel piksel merged commit 468d552 into main May 25, 2022
@piksel piksel deleted the feat/discord-multi-send branch May 25, 2022 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compatibility: Watchtower Related to the usage of Shoutrrr in Watchtower Service: Discord Related to the Discord Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants