From 830ee616674e24681d7de24501678357b8c96288 Mon Sep 17 00:00:00 2001 From: Sean Hinchee Date: Wed, 31 Jan 2018 07:36:41 +0000 Subject: [PATCH] fixed a bug in feed subscription --- x/mux/commits.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/mux/commits.go b/x/mux/commits.go index 24deb7f2b7c3a0581c7b4721754c2dc850aae135..1d328c66d486ec874c479e366c759bc8fb2ece04 100644 --- a/x/mux/commits.go +++ b/x/mux/commits.go @@ -102,7 +102,10 @@ func (m *Mux) Add(ds *discordgo.Session, dm *discordgo.Message, ctx *Context) { fmt.Println("Proposed subscribe for: ", url) for _, v := range Config.Feeds { - if strings.Contains(url, v.Link) { + // this is bad matching, can't have two bitbucket url's? + if strings.Contains(url, v.UpdateURL) { + //fmt.Println(url) + //fmt.Println(v.Link) resp += "Denied! Feed already subscribed to." resp += "```\n" ds.ChannelMessageSend(dm.ChannelID, resp)