Merge branch 'feat-cjy-tag' into dev

This commit is contained in:
cjy 2026-01-12 13:34:57 +08:00
commit 71aecaf454

View File

@ -289,6 +289,11 @@ func GenerateAutoHashtags(ctx context.Context, post string, max int32, position,
max = int32(5 - len(beforeTags)) max = int32(5 - len(beforeTags))
} }
// 如果此时 max 小于等于0则直接返回
if max <= 0 {
return nil, nil, false, nil
}
profileKey, err := GetValidProfileKey(ctx, []uint32{1, 2, 3, 5}) profileKey, err := GetValidProfileKey(ctx, []uint32{1, 2, 3, 5})
if err != nil { if err != nil {
return nil, nil, false, err return nil, nil, false, err