mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-07 09:12:57 +02:00
feat(contacts): add ignored and blocked contact lists
- New DB tables: ignored_contacts, blocked_contacts (keyed by pubkey) - Ignored contacts: cached but excluded from pending/auto-add - Blocked contacts: ignored + messages hidden from chat (stored in DB) - Backend: filter in _on_new_contact, _on_channel_message, _on_dm_received - API: /contacts/<pk>/ignore, /contacts/<pk>/block toggle endpoints - API: filter blocked from /api/messages and /dm/conversations - Frontend: Ignore/Block buttons on pending cards, existing cards, chat messages - Frontend: source filter dropdown with Ignored/Blocked options - Frontend: status icons (eye-slash, slash-circle) on contact cards - Frontend: real-time blocked message filtering via socketio - Name→pubkey mapping for chat window block/ignore buttons Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -137,6 +137,18 @@ CREATE TABLE IF NOT EXISTS read_status (
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
-- Ignored contacts (adverts cached but not pending/auto-added)
|
||||
CREATE TABLE IF NOT EXISTS ignored_contacts (
|
||||
public_key TEXT PRIMARY KEY REFERENCES contacts(public_key),
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
-- Blocked contacts (ignored + messages hidden from display)
|
||||
CREATE TABLE IF NOT EXISTS blocked_contacts (
|
||||
public_key TEXT PRIMARY KEY REFERENCES contacts(public_key),
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
-- ============================================================
|
||||
-- Indexes
|
||||
-- ============================================================
|
||||
|
||||
Reference in New Issue
Block a user