We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4c6ea2 commit 694e47cCopy full SHA for 694e47c
src/Share/BackgroundJobs/Webhooks/Worker.hs
@@ -278,8 +278,10 @@ buildWebhookRequest webhookId uri event defaultPayload = do
278
279
isDiscordWebhook :: URI -> Bool
280
isDiscordWebhook uri =
281
- case (URI.uriRegName <$> URI.uriAuthority uri, URI.uriPath uri) of
282
- (Just regName, path) -> Text.isPrefixOf "discord.com" (Text.pack regName) && List.isPrefixOf path "/api/webhooks"
+ case (URI.uriRegName <$> URI.uriAuthority uri) of
+ Just regName ->
283
+ Text.isPrefixOf "discord.com" (Text.pack regName)
284
+ && Text.isPrefixOf "/api/webhooks" (Text.pack $ URI.uriPath uri)
285
_ -> False
286
287
buildDefaultPayload :: Either WebhookSendFailure HTTPClient.Request
0 commit comments