From 7e1bf3ca608142445f4ac26b19c0f209778496c7 Mon Sep 17 00:00:00 2001 From: cjy Date: Mon, 12 Jan 2026 13:34:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=8C=E9=81=BF=E5=85=8D=E5=A4=9A=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E4=B8=80=E6=AC=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/cast/tag.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/service/cast/tag.go b/pkg/service/cast/tag.go index 836662e..1a8f625 100644 --- a/pkg/service/cast/tag.go +++ b/pkg/service/cast/tag.go @@ -289,6 +289,11 @@ func GenerateAutoHashtags(ctx context.Context, post string, max int32, position, max = int32(5 - len(beforeTags)) } + // 如果此时 max 小于等于0,则直接返回 + if max <= 0 { + return nil, nil, false, nil + } + profileKey, err := GetValidProfileKey(ctx, []uint32{1, 2, 3, 5}) if err != nil { return nil, nil, false, err