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(); }