From d8683f9fd2514079c4bc15c451df23b46800e22d Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Tue, 28 Apr 2020 11:48:39 -0400 Subject: [PATCH] meme: add user name --- plugins/meme/meme.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/meme/meme.go b/plugins/meme/meme.go index 1e11516..f9cfe70 100644 --- a/plugins/meme/meme.go +++ b/plugins/meme/meme.go @@ -59,6 +59,7 @@ func (p *MemePlugin) registerWeb(c bot.Connector) { r.ParseForm() log.Debug().Msgf("Meme:\n%+v", r.PostForm.Get("text")) channel := r.PostForm.Get("channel_id") + user := r.PostForm.Get("user_name") log.Debug().Msgf("channel: %s", channel) parts := strings.SplitN(r.PostForm.Get("text"), " ", 2) @@ -73,7 +74,7 @@ func (p *MemePlugin) registerWeb(c bot.Connector) { log.Debug().Msgf("image is at %s", u.String()) p.bot.Send(c, bot.Message, channel, "", bot.ImageAttachment{ URL: u.String(), - AltTxt: parts[1], + AltTxt: user, }) w.Write(nil) })