fix(photon): support E.164 and DM GUID targets for home channel
Allow PHOTON_HOME_CHANNEL to accept a bare E.164 phone number or a `any;-;+1...` DM chat GUID in addition to a Spectrum space id. Inbound DM spaces are cached so replies resolve without a second SDK lookup, and `photon` is added to _PHONE_PLATFORMS so send_message treats E.164 strings as explicit targets rather than falling through to channel-name resolution.
This commit is contained in:
parent
92179352fb
commit
0646656884
5 changed files with 86 additions and 11 deletions
|
|
@ -1199,6 +1199,11 @@ class TestParseTargetRefE164:
|
|||
assert chat_id == "+15551234567"
|
||||
assert is_explicit is True
|
||||
|
||||
def test_photon_e164_is_explicit(self):
|
||||
chat_id, _, is_explicit = _parse_target_ref("photon", "+15551234567")
|
||||
assert chat_id == "+15551234567"
|
||||
assert is_explicit is True
|
||||
|
||||
def test_signal_bare_digits_still_work(self):
|
||||
"""Bare digit strings continue to match the generic numeric branch."""
|
||||
chat_id, _, is_explicit = _parse_target_ref("signal", "15551234567")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue