From b38ecc9d0b950280ac8082f4e797736ef7e5336a Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 3 Jul 2024 12:27:54 +0200 Subject: [PATCH] [kofi] Fix: Use message as string with pointer of string comparisons do not work properly and make templating hard Signed-off-by: Knut Ahlers --- internal/apimodules/kofi/kofi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/apimodules/kofi/kofi.go b/internal/apimodules/kofi/kofi.go index d05a917..c6121b8 100644 --- a/internal/apimodules/kofi/kofi.go +++ b/internal/apimodules/kofi/kofi.go @@ -100,8 +100,8 @@ func handleKoFiPost(w http.ResponseWriter, r *http.Request) { fields.Set("isSubscription", payload.IsSubscriptionPayment) fields.Set("isFirstSubPayment", payload.IsFirstSubscriptionPayment) - if payload.IsPublic { - fields.Set("message", payload.Message) + if payload.IsPublic && payload.Message != nil { + fields.Set("message", *payload.Message) } if payload.IsSubscriptionPayment && payload.TierName != nil {