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:
@@ -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",
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user