From 94decc6bad61dfc612d6a6c5f18067b8179d7fb9 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 25 Feb 2025 23:55:13 +0800 Subject: [PATCH] :sparkles: Subscription now will contains related_post meta --- pkg/internal/services/subscriptions.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/internal/services/subscriptions.go b/pkg/internal/services/subscriptions.go index 6b16763..a94b092 100644 --- a/pkg/internal/services/subscriptions.go +++ b/pkg/internal/services/subscriptions.go @@ -175,11 +175,16 @@ func NotifyUserSubscription(poster models.Publisher, item models.Post, content s }) } + metadata := map[string]any{ + "related_post": TruncatePostContent(item), + } + err := authkit.NotifyUserBatch(gap.Nx, userIDs, pushkit.Notification{ Topic: "interactive.subscription", Title: nTitle, Subtitle: nSubtitle, Body: body, + Metadata: metadata, Priority: 3, })