diff options
author | Qais Patankar <qaisjp@gmail.com> | 2020-05-06 23:19:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 00:19:48 +0200 |
commit | 52a071e34d4e7d0ba69f41619d854d304e77b05d (patch) | |
tree | 23d2807885c6600a17c9544fe84e92dc5a4e1377 /bridge/discord | |
parent | 2d8f749e361eeca5da698138a42e182fdfea4713 (diff) | |
download | matterbridge-msglm-52a071e34d4e7d0ba69f41619d854d304e77b05d.tar.gz matterbridge-msglm-52a071e34d4e7d0ba69f41619d854d304e77b05d.tar.bz2 matterbridge-msglm-52a071e34d4e7d0ba69f41619d854d304e77b05d.zip |
Fix #1049: missing space before embeds (discord) (#1124)
Diffstat (limited to 'bridge/discord')
-rw-r--r-- | bridge/discord/handlers.go | 2 | ||||
-rw-r--r-- | bridge/discord/handlers_test.go | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bridge/discord/handlers.go b/bridge/discord/handlers.go index 79697266..c209da18 100644 --- a/bridge/discord/handlers.go +++ b/bridge/discord/handlers.go @@ -217,7 +217,7 @@ func handleEmbed(embed *discordgo.MessageEmbed) string { i++ if i == 1 { - result += "embed: " + e + result += " embed: " + e continue } diff --git a/bridge/discord/handlers_test.go b/bridge/discord/handlers_test.go index af821ad0..a809dadd 100644 --- a/bridge/discord/handlers_test.go +++ b/bridge/discord/handlers_test.go @@ -20,14 +20,14 @@ func TestHandleEmbed(t *testing.T) { embed: &discordgo.MessageEmbed{ Title: "blah", }, - result: "embed: blah\n", + result: " embed: blah\n", }, "two": { embed: &discordgo.MessageEmbed{ Title: "blah", Description: "blah2", }, - result: "embed: blah - blah2\n", + result: " embed: blah - blah2\n", }, "three": { embed: &discordgo.MessageEmbed{ @@ -35,20 +35,20 @@ func TestHandleEmbed(t *testing.T) { Description: "blah2", URL: "blah3", }, - result: "embed: blah - blah2 - blah3\n", + result: " embed: blah - blah2 - blah3\n", }, "twob": { embed: &discordgo.MessageEmbed{ Description: "blah2", URL: "blah3", }, - result: "embed: blah2 - blah3\n", + result: " embed: blah2 - blah3\n", }, "oneb": { embed: &discordgo.MessageEmbed{ URL: "blah3", }, - result: "embed: blah3\n", + result: " embed: blah3\n", }, } |