feat(db): Add sender-based message filtering (#4477)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-02-06 09:13:59 -06:00 committed by GitHub
parent d48a0ea2b3
commit fce8e7cd08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 235 additions and 4 deletions

View file

@ -344,6 +344,11 @@ constructor(
dbManager.currentDb.value.packetDao().migrateChannelsByPSK(oldSettings, newSettings)
}
suspend fun updateFilteredBySender(senderId: String, filtered: Boolean) {
val pattern = "%\"from\":\"${senderId}\"%"
withContext(dispatchers.io) { dbManager.currentDb.value.packetDao().updateFilteredBySender(pattern, filtered) }
}
private fun org.meshtastic.core.database.dao.PacketDao.getAllWaypointsFlow(): Flow<List<Packet>> =
getAllPackets(PortNum.WAYPOINT_APP.value)