From ba47710b4620532dcf2880ac08dd4e17d1d29dc9 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Mon, 11 Jan 2021 17:25:31 -0500 Subject: [PATCH 1/2] meme: add confirm to deletion button --- plugins/meme/web.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/meme/web.go b/plugins/meme/web.go index 60a5e76..32994f9 100644 --- a/plugins/meme/web.go +++ b/plugins/meme/web.go @@ -200,12 +200,14 @@ var memeIndex = ` evt.preventDefault(); evt.stopPropagation(); } - axios.delete('/meme/rm', { data: this.editConfig }) - .then(resp => { - this.editConfig = null; - this.refresh(); - }) - .catch(err => this.err = err); + if (confirm("Are you sure you want to delete this meme?")) { + axios.delete('/meme/rm', { data: this.editConfig }) + .then(resp => { + this.editConfig = null; + this.refresh(); + }) + .catch(err => this.err = err); + } } } }) From ff4b541c01b70764fdebe5fbf124bc4ca27b637b Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Thu, 14 Jan 2021 16:54:23 -0500 Subject: [PATCH 2/2] slackApp: convert from channel to conversation --- connectors/slackapp/slackApp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectors/slackapp/slackApp.go b/connectors/slackapp/slackApp.go index e162f7d..bd4077b 100644 --- a/connectors/slackapp/slackApp.go +++ b/connectors/slackapp/slackApp.go @@ -491,7 +491,7 @@ func (s *SlackApp) getChannel(id string) (*slack.Channel, error) { Str("id", id). Msg("Channel not known, requesting info") - ch, err := s.api.GetChannelInfo(id) + ch, err := s.api.GetConversationInfo(id, false) if err != nil { return nil, err }