From d8b972be26a928f7a649b9043fdf981154e3f9fe Mon Sep 17 00:00:00 2001 From: cjy Date: Thu, 8 Jan 2026 14:17:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8E=B7=E5=8F=96=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=92=8C=E7=83=AD=E9=97=A8=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=8F=96=E6=9C=89=E6=95=88=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/cast/tag.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkg/service/cast/tag.go b/pkg/service/cast/tag.go index 0534dee..fefe372 100644 --- a/pkg/service/cast/tag.go +++ b/pkg/service/cast/tag.go @@ -288,7 +288,6 @@ func GenerateAutoHashtags(ctx context.Context, post string, max int32, position, max = int32(5 - len(beforeTags)) } - // 获取有效的 profileKey(从 TikTok、YouTube、Instagram、Bluesky 平台获取) profileKey, err := GetValidProfileKey(ctx, []uint32{1, 2, 3, 5}) if err != nil { return nil, nil, false, err @@ -372,6 +371,12 @@ func RecommendHashtags(ctx *gin.Context) { service.Error(ctx, err) return } + profileKey, err := GetValidProfileKey(context.Background(), []uint32{1}) + if err != nil { + service.Error(ctx, err) + return + } + req.ProfileKey = profileKey resp, err := service.AyrshareProvider.RecommendHashtags(context.Background(), req) if err != nil { zap.L().Error("RecommendHashtags failed", zap.Error(err)) @@ -391,6 +396,12 @@ func SearchHashtags(ctx *gin.Context) { service.Error(ctx, err) return } + profileKey, err := GetValidProfileKey(context.Background(), []uint32{3}) + if err != nil { + service.Error(ctx, err) + return + } + req.ProfileKey = profileKey resp, err := service.AyrshareProvider.SearchHashtags(context.Background(), req) if err != nil { zap.L().Error("SearchHashtags failed", zap.Error(err))