test(slack): address review nits on the subtype allowlist

Drop the unreachable handle_message assertion in the drop tests
(_prefilter_inbound never calls it) and state the deliberate
file_comment drop decision in the allowlist comment.
This commit is contained in:
liuhao1024
2026-09-14 19:29:44 +08:00
committed by Teknium
parent 90aa5e3511
commit a019976430
2 changed files with 2 additions and 1 deletions
+2
View File
@@ -4313,6 +4313,8 @@ class SlackAdapter(BasePlatformAdapter):
# ``me_message`` passes: ``/me`` is a person speaking.
# ``bot_message`` already passed allow_bots above; document_mention is an
# explicit app mention from a Slack canvas, not a lifecycle notification.
# ``file_comment`` stays in the drop set deliberately (triage decision on
# #110778): a comment left on a file is not the owner talking to the bot.
subtype = event.get("subtype")
if subtype not in (
None, "", "file_share", "thread_broadcast", "me_message",
-1
View File
@@ -6093,7 +6093,6 @@ class TestNonConversationalSubtypeAllowlist:
)
async def test_housekeeping_subtypes_are_dropped(self, adapter, subtype):
assert await adapter._prefilter_inbound(self._event(subtype), None) is None
adapter.handle_message.assert_not_awaited()
@pytest.mark.asyncio
@pytest.mark.parametrize(