From 52a071e34d4e7d0ba69f41619d854d304e77b05d Mon Sep 17 00:00:00 2001 From: Qais Patankar Date: Wed, 6 May 2020 23:19:48 +0100 Subject: Fix #1049: missing space before embeds (discord) (#1124) --- bridge/discord/handlers.go | 2 +- bridge/discord/handlers_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'bridge/discord') 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", }, } -- cgit v1.2.3