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
4 changes: 4 additions & 0 deletions plugins/platforms/photon/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ class PhotonAdapter(BasePlatformAdapter):
"""

MAX_MESSAGE_LENGTH = _MAX_MESSAGE_LENGTH
# Photon (iMessage) has no real edit API for already-sent messages.
# Mark it explicitly so streaming suppresses the visible cursor instead
# of leaving a stale tofu square (▉) behind when edit attempts fail.
SUPPORTS_MESSAGE_EDITING = False

def __init__(self, config: PlatformConfig):
super().__init__(config, Platform("photon"))
Expand Down
12 changes: 12 additions & 0 deletions tests/plugins/platforms/photon/test_streaming.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Regression tests for Photon adapter streaming behavior."""
from plugins.platforms.photon.adapter import PhotonAdapter


def test_photon_adapter_does_not_support_message_editing() -> None:
"""PhotonAdapter.SUPPORTS_MESSAGE_EDITING must be False.

Photon (iMessage) has no real edit API for already-sent messages.
This attribute signals the gateway to suppress the streaming cursor
instead of leaving a stale tofu square (▉) behind when edit attempts fail.
"""
assert PhotonAdapter.SUPPORTS_MESSAGE_EDITING is False
Loading