From 2f96ae9fe338f5b53063728e40317ecfb09719e0 Mon Sep 17 00:00:00 2001 From: syui Date: Sun, 22 Mar 2026 16:30:32 +0900 Subject: [PATCH] fix: use valid handle format for accounts --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index b813675..b2b7f7e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -398,9 +398,11 @@ fn init_db(conn: &Connection) { } fn ensure_account(conn: &Connection, did: &str) { + // handle must be a valid handle format, not a DID + let handle = format!("{}.chat.invalid", did.split(':').last().unwrap_or("unknown")); conn.execute( "INSERT OR IGNORE INTO accounts (did, handle, created_at) VALUES (?1, ?2, ?3)", - rusqlite::params![did, did, now_iso()], + rusqlite::params![did, handle, now_iso()], ) .ok(); }