Fix business plans

This commit is contained in:
2026-03-02 00:23:27 +00:00
parent b3e183eb0a
commit a9f5f3f75d
5 changed files with 117 additions and 9 deletions

View File

@@ -239,3 +239,36 @@ class Phase1CommandEngineTests(TestCase):
)
)
self.assertEqual([], results)
def test_eligible_profile_matches_whatsapp_group_identifier_variants(self):
self.profile.channel_bindings.all().delete()
CommandChannelBinding.objects.create(
profile=self.profile,
direction="ingress",
service="whatsapp",
channel_identifier="120363402761690215@g.us",
enabled=True,
)
msg = Message.objects.create(
user=self.user,
session=self.session,
sender_uuid="",
text="#bp#",
ts=5000,
source_service="whatsapp",
source_chat_id="120363402761690215@g.us",
message_meta={},
)
results = async_to_sync(process_inbound_message)(
CommandContext(
service="whatsapp",
channel_identifier="120363402761690215",
message_id=str(msg.id),
user_id=self.user.id,
message_text="#bp#",
payload={},
)
)
self.assertEqual(1, len(results))
self.assertEqual("skipped", results[0].status)
self.assertEqual("reply_required", results[0].error)