Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions plugins/platforms/photon/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,19 +875,6 @@ def _normalize_binary_payload(
)

ctype = content.get("type")
if ctype == "text":
raw_text = content.get("text") or ""
# iMessage emits U+FFFC OBJECT REPLACEMENT CHARACTER as a transient
# placeholder for some media bubbles (notably voice notes). Photon
# can then deliver the real attachment/voice event immediately
# afterwards with a different message id. If we dispatch the
# placeholder as a standalone text turn, the subsequent media event
# arrives while that turn is active and the gateway sends a bogus
# "Interrupting current task" busy ack. Drop placeholder-only text
# at the platform boundary; the real media event carries the bytes.
if raw_text.strip() == "\ufffc":
logger.debug("[photon] ignoring iMessage object-placeholder text event")
return
if ctype == "reaction":
# Route only tapbacks on messages WE sent — those are implicitly
# addressed to the bot (feishu precedent: synthetic text event).
Expand Down
5 changes: 4 additions & 1 deletion tests/plugins/platforms/photon/test_runtime_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ def _patch_spawn(
) -> None:
"""Stub everything _start_sidecar touches before the healthz loop."""
sidecar_dir = tmp_path / "sidecar"
(sidecar_dir / "node_modules").mkdir(parents=True)
# sidecar_deps_installed() checks the spectrum-ts package dir, not bare
# node_modules/ (9cf2046081 hardened it against partial npm installs) —
# the fixture must materialize the dependency dir the probe looks for.
(sidecar_dir / "node_modules" / "spectrum-ts").mkdir(parents=True)
monkeypatch.setattr(photon_adapter, "_SIDECAR_DIR", sidecar_dir)
monkeypatch.setattr(photon_adapter, "_sidecar_deps_stale", lambda: False)

Expand Down
Loading