feat(smzdm): require 1:1 cover and surface image fetch failure prompt

Add SMZDM to the cover-required platform list on both client and server,
register a 800x800 native cover spec in the admin cover catalog, and
normalize the desktop-client `smzdm_image_fetch_failed` adapter error to a
user-friendly Chinese prompt across the publisher error pipeline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 18:43:07 +08:00
parent 6b710c8919
commit 28e4059d66
6 changed files with 45 additions and 8 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ func publishBatchRequiresCover(accounts []platformAccountSeed) bool {
func publishPlatformRequiresCover(platformID string) bool {
switch strings.TrimSpace(platformID) {
case "weixin_gzh", "baijiahao", "dongchedi":
case "weixin_gzh", "baijiahao", "dongchedi", "smzdm":
return true
default:
return false
@@ -5,7 +5,7 @@ import "testing"
func TestPublishPlatformRequiresCover(t *testing.T) {
t.Parallel()
for _, platformID := range []string{"weixin_gzh", "baijiahao", "dongchedi"} {
for _, platformID := range []string{"weixin_gzh", "baijiahao", "dongchedi", "smzdm"} {
if !publishPlatformRequiresCover(platformID) {
t.Fatalf("publishPlatformRequiresCover(%q) = false, want true", platformID)
}
@@ -19,12 +19,12 @@ func TestPublishPlatformRequiresCover(t *testing.T) {
func TestPublishCoverRequirementCallersIncludeWeixinGzh(t *testing.T) {
t.Parallel()
accounts := []platformAccountSeed{{PlatformID: "weixin_gzh"}}
accounts := []platformAccountSeed{{PlatformID: "weixin_gzh"}, {PlatformID: "smzdm"}}
if !publishBatchRequiresCover(accounts) {
t.Fatal("publishBatchRequiresCover() = false for weixin_gzh, want true")
t.Fatal("publishBatchRequiresCover() = false for cover-required platforms, want true")
}
if !schedulePublishPlatformsRequireCover([]string{"weixin_gzh"}) {
t.Fatal("schedulePublishPlatformsRequireCover() = false for weixin_gzh, want true")
if !schedulePublishPlatformsRequireCover([]string{"weixin_gzh", "smzdm"}) {
t.Fatal("schedulePublishPlatformsRequireCover() = false for cover-required platforms, want true")
}
}