From 5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 27 Aug 2017 22:59:37 +0200 Subject: Modify Send() to return also a message id --- bridge/discord/discord.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bridge/discord') diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 7debcda0..b44ad898 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -108,12 +108,12 @@ func (b *bdiscord) JoinChannel(channel config.ChannelInfo) error { return nil } -func (b *bdiscord) Send(msg config.Message) error { +func (b *bdiscord) Send(msg config.Message) (string, error) { flog.Debugf("Receiving %#v", msg) channelID := b.getChannelID(msg.Channel) if channelID == "" { flog.Errorf("Could not find channelID for %v", msg.Channel) - return nil + return "", nil } if msg.Event == config.EVENT_USER_ACTION { msg.Text = "_" + msg.Text + "_" @@ -142,7 +142,7 @@ func (b *bdiscord) Send(msg config.Message) error { AvatarURL: msg.Avatar, }) } - return nil + return "", nil } func (b *bdiscord) messageUpdate(s *discordgo.Session, m *discordgo.MessageUpdate) { -- cgit v1.2.3