Move to server side preference and read indicator management

This commit is contained in:
Jack Kingsman
2026-01-18 23:44:56 -08:00
parent 43b7e94b0a
commit 9c071dbc53
24 changed files with 1339 additions and 703 deletions
+7 -7
View File
@@ -100,8 +100,8 @@ class TestMigration001:
# Run migrations
applied = await run_migrations(conn)
assert applied == 8 # All 8 migrations run
assert await get_version(conn) == 8
assert applied == 9 # All 9 migrations run
assert await get_version(conn) == 9
# Verify columns exist by inserting and selecting
await conn.execute(
@@ -183,9 +183,9 @@ class TestMigration001:
applied1 = await run_migrations(conn)
applied2 = await run_migrations(conn)
assert applied1 == 8 # All 8 migrations run
assert applied1 == 9 # All 9 migrations run
assert applied2 == 0 # No migrations on second run
assert await get_version(conn) == 8
assert await get_version(conn) == 9
finally:
await conn.close()
@@ -245,9 +245,9 @@ class TestMigration001:
# Run migrations - should not fail
applied = await run_migrations(conn)
# All 8 migrations applied (version incremented) but no error
assert applied == 8
assert await get_version(conn) == 8
# All 9 migrations applied (version incremented) but no error
assert applied == 9
assert await get_version(conn) == 9
finally:
await conn.close()
+5 -1
View File
@@ -260,8 +260,12 @@ class TestAdvertisementPipeline:
async def test_advertisement_triggers_historical_decrypt_for_new_contact(
self, test_db, captured_broadcasts
):
"""New contact via advertisement starts historical DM decryption."""
"""New contact via advertisement starts historical DM decryption when setting enabled."""
from app.packet_processor import process_raw_packet
from app.repository import AppSettingsRepository
# Enable auto-decrypt setting
await AppSettingsRepository.update(auto_decrypt_dm_on_advert=True)
fixture = FIXTURES["advertisement_with_gps"]
packet_bytes = bytes.fromhex(fixture["raw_packet_hex"])