Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit c9ba514ae01b384892eed3314506ae4ca5cc32e3 Author: Wim <wim@42.be> Date: Wed Feb 07 14:57:38 2018 +0000 Check for a valid WebhookURL (discord). Closes #367 diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index d57f912..1f7e50c 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -3696 +3699 @@ func (b *bdiscord) stripCustomoji(text string) string {  // splitURL splits a webhookURL and returns the id and token  func (b *bdiscord) splitURL(url string) (string, string) {   webhookURLSplit := strings.Split(url, "/") + if len(webhookURLSplit) != 7 { + log.Fatalf("%s is no correct discord WebhookURL", url) + }   return webhookURLSplit[len(webhookURLSplit)-2], webhookURLSplit[len(webhookURLSplit)-1]  }