5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 12:50:27 +00:00

Fix #1049: missing space before embeds (discord) (#1124)

This commit is contained in:
Qais Patankar 2020-05-06 23:19:48 +01:00 committed by GitHub
parent 2d8f749e36
commit 52a071e34d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -217,7 +217,7 @@ func handleEmbed(embed *discordgo.MessageEmbed) string {
i++ i++
if i == 1 { if i == 1 {
result += "embed: " + e result += " embed: " + e
continue continue
} }

View File

@ -20,14 +20,14 @@ func TestHandleEmbed(t *testing.T) {
embed: &discordgo.MessageEmbed{ embed: &discordgo.MessageEmbed{
Title: "blah", Title: "blah",
}, },
result: "embed: blah\n", result: " embed: blah\n",
}, },
"two": { "two": {
embed: &discordgo.MessageEmbed{ embed: &discordgo.MessageEmbed{
Title: "blah", Title: "blah",
Description: "blah2", Description: "blah2",
}, },
result: "embed: blah - blah2\n", result: " embed: blah - blah2\n",
}, },
"three": { "three": {
embed: &discordgo.MessageEmbed{ embed: &discordgo.MessageEmbed{
@ -35,20 +35,20 @@ func TestHandleEmbed(t *testing.T) {
Description: "blah2", Description: "blah2",
URL: "blah3", URL: "blah3",
}, },
result: "embed: blah - blah2 - blah3\n", result: " embed: blah - blah2 - blah3\n",
}, },
"twob": { "twob": {
embed: &discordgo.MessageEmbed{ embed: &discordgo.MessageEmbed{
Description: "blah2", Description: "blah2",
URL: "blah3", URL: "blah3",
}, },
result: "embed: blah2 - blah3\n", result: " embed: blah2 - blah3\n",
}, },
"oneb": { "oneb": {
embed: &discordgo.MessageEmbed{ embed: &discordgo.MessageEmbed{
URL: "blah3", URL: "blah3",
}, },
result: "embed: blah3\n", result: " embed: blah3\n",
}, },
} }