fix: use moodStarShortcut+moodMap for liked state, warn on silent fail (v0.4.6)

FW_DEBUG=1 investigation revealed:
- wallmood can silently fail (200 OK, frozen modifDate, no state change) due to
  self-like restriction, unsupported post type (FAMILY_CREATED), or rate limit
- Response contains two complementary like indicators: moodStarShortcut (primary)
  and moodMap (secondary) — both must be checked
- liked: false with like=True now surfaces a warning instead of silently
  returning a misleading result
- SPEC.md documents silent-fail scenarios and dual indicator pattern

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-15 16:12:05 +02:00
parent da5be55070
commit 4cd0bdc499
4 changed files with 41 additions and 11 deletions
+19 -2
View File
@@ -324,8 +324,25 @@ a00.r.r → vollständiges Wall-Message-Objekt
.rights.canDelete → "true"/"false"
```
**Like-Zustand bestimmen:** `moodMap[accountId]` enthält `["STAR"]` wenn der
jeweilige Account geliked hat. Leere Map oder fehlender Key = kein Like.
**Like-Zustand bestimmen (zwei Indikatoren, beide auswerten):**
| Feld | Typ | Bedeutung |
|---|---|---|
| `moodStarShortcut` | `"true"` / `"false"` | Primär: direktes User-Like-Flag für den anfragenden Account |
| `moodMap[accountId]` | `["STAR"]` | Sekundär: accountId → Mood-Liste; enthält `"STAR"` wenn geliked |
Beide Indikatoren können den Like-Zustand korrekt abbilden — je nach API-internem
Speicherpfad ist nur einer gesetzt. Immer beide prüfen.
**Silent-Fail-Szenarien (API antwortet 200, aber Like wird nicht gesetzt):**
- **Self-Like-Restriction**: Eigener Post kann nicht geliked werden
(verifiziert: Account 23431898 kann Post `wall/23431854_31119189` nicht liken,
obwohl API regulär antwortet — `modifDate` bleibt eingefroren)
- **Unsupported Post-Typ**: `FAMILY_CREATED`-Posts ignorieren wallmood-Calls
- **Rate-Limit**: Nach vielen Calls kann die API Still-Fails zurückgeben
Erkennungsmerkmal für Silent-Fail: `modifDate` im Response identisch zum Vorherigen
AND `moodStarShortcut: false` AND `moodMap: {}`.
## Noch zu verifizieren