diff --git a/lib/src/Client.dart b/lib/src/Client.dart index 38fdc14..9b12501 100644 --- a/lib/src/Client.dart +++ b/lib/src/Client.dart @@ -224,9 +224,13 @@ class Client { /// the famedlyContactDiscovery room, which is /// defined by the autojoin room feature in Synapse. Future> loadFamedlyContacts() async { + List contacts = []; Room contactDiscoveryRoom = await store .getRoomByAlias("#famedlyContactDiscovery:${userID.split(":")[1]}"); - List contacts = await contactDiscoveryRoom.requestParticipants(); + if (contactDiscoveryRoom != null) + contacts = await contactDiscoveryRoom.requestParticipants(); + else + contacts = await store.loadContacts(); return contacts; } diff --git a/lib/src/Store.dart b/lib/src/Store.dart index 45b3a28..6bc7c81 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -458,7 +458,6 @@ class Store { /// Loads all Users in the database to provide a contact list /// except users who are in the Room with the ID [exceptRoomID]. - @deprecated Future> loadContacts({String exceptRoomID = ""}) async { List> res = await db.rawQuery( "SELECT * FROM Users WHERE matrix_id!=? AND chat_id!=? GROUP BY matrix_id ORDER BY displayname",