catch exception if user is not logged in

This commit is contained in:
Believethehype 2024-02-14 12:22:20 +01:00
parent 20c605e245
commit af2f4cd8e3

View File

@ -413,7 +413,12 @@ async function checkuser(msg){
async function get_user_from_search(name){
name = "\"name\":" + name
let dbclient = store.state.dbclient
if (store.state.dbclient.database === undefined){
console.log("not logged in, not getting profile suggestions")
return []
}
let dbclient = store.state.dbclient
let profiles = []
let filter1 = new Filter().kind(0).search(name)
let evts = await dbclient.database.query([filter1])