add sender allowlist for per-chat access control (#705)

* feat: add sender allowlist for per-chat access control

* style: fix prettier formatting
This commit is contained in:
Akshan Krithick
2026-03-04 08:05:45 -08:00
committed by GitHub
parent a5845a5cf4
commit 4de981b9b9
6 changed files with 423 additions and 7 deletions

View File

@@ -313,7 +313,7 @@ export function getNewMessages(
// Filter bot messages using both the is_bot_message flag AND the content
// prefix as a backstop for messages written before the migration ran.
const sql = `
SELECT id, chat_jid, sender, sender_name, content, timestamp
SELECT id, chat_jid, sender, sender_name, content, timestamp, is_from_me
FROM messages
WHERE timestamp > ? AND chat_jid IN (${placeholders})
AND is_bot_message = 0 AND content NOT LIKE ?
@@ -341,7 +341,7 @@ export function getMessagesSince(
// Filter bot messages using both the is_bot_message flag AND the content
// prefix as a backstop for messages written before the migration ran.
const sql = `
SELECT id, chat_jid, sender, sender_name, content, timestamp
SELECT id, chat_jid, sender, sender_name, content, timestamp, is_from_me
FROM messages
WHERE chat_jid = ? AND timestamp > ?
AND is_bot_message = 0 AND content NOT LIKE ?