Behave better around DM dedupe/storage. Closes #77.

This commit is contained in:
Jack Kingsman
2026-03-18 17:16:34 -07:00
parent 4d5f0087cc
commit 350c85ca6d
11 changed files with 436 additions and 34 deletions
+3 -4
View File
@@ -78,8 +78,8 @@ async def test_null_sender_timestamp_defaults_to_received_at(test_db):
@pytest.mark.asyncio
async def test_direct_messages_with_same_text_and_timestamp_are_allowed(test_db):
"""Direct messages no longer share the channel echo dedup index."""
async def test_incoming_direct_messages_with_same_text_and_timestamp_dedup(test_db):
"""Incoming direct messages now collapse onto one content-identity row."""
received_at = 600
msg_id1 = await MessageRepository.create(
msg_type="PRIV",
@@ -97,8 +97,7 @@ async def test_direct_messages_with_same_text_and_timestamp_are_allowed(test_db)
sender_timestamp=received_at,
received_at=received_at,
)
assert msg_id2 is not None
assert msg_id2 != msg_id1
assert msg_id2 is None
@pytest.mark.asyncio