Skip to content

Commit

Permalink
Do not track subscribe button, useless
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasTJdev committed Feb 4, 2025
1 parent 7b7cf07 commit cbc3371
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nimletter.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.3.9"
version = "0.4.0"
author = "ThomasTJdev"
description = "Newsletter"
license = "AGPL v3"
Expand Down
3 changes: 3 additions & 0 deletions src/email/email_variables.nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ template linkReplace() =
let reLink = re("""href="([^"]+)"""")
let links = findAll(result, reLink)
for link in links:
if link.contains("/subscribe/optin"):
continue

let
base64 = encode(link.split("\"")[1])

Expand Down
3 changes: 0 additions & 3 deletions src/routes/routes_webhooks_sns.nim
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,9 @@ const pathTracker = "/assets/images/nimletter_icon.png"

webhooksSnsRouter.get("/webhook/tracking/@mailuuid/@action/@do",
proc(request: Request) =
when defined(dev):
echo "Received SNS webhook"

let mailuuid = @"mailuuid"


if not mailuuid.isValidUUID() and mailuuid != "pure":
resp Http400

Expand Down

0 comments on commit cbc3371

Please sign in to comment.