Merge branch 'contactlist-enhance-requestbyroom' into 'master'
[ContactList] Fallback with old loadContacts See merge request famedly/famedlysdk!55
This commit is contained in:
		
						commit
						29c677e5ba
					
				|  | @ -224,9 +224,13 @@ class Client { | ||||||
|   /// the famedlyContactDiscovery room, which is |   /// the famedlyContactDiscovery room, which is | ||||||
|   /// defined by the autojoin room feature in Synapse. |   /// defined by the autojoin room feature in Synapse. | ||||||
|   Future<List<User>> loadFamedlyContacts() async { |   Future<List<User>> loadFamedlyContacts() async { | ||||||
|  |     List<User> contacts = []; | ||||||
|     Room contactDiscoveryRoom = await store |     Room contactDiscoveryRoom = await store | ||||||
|         .getRoomByAlias("#famedlyContactDiscovery:${userID.split(":")[1]}"); |         .getRoomByAlias("#famedlyContactDiscovery:${userID.split(":")[1]}"); | ||||||
|     List<User> contacts = await contactDiscoveryRoom.requestParticipants(); |     if (contactDiscoveryRoom != null) | ||||||
|  |       contacts = await contactDiscoveryRoom.requestParticipants(); | ||||||
|  |     else | ||||||
|  |       contacts = await store.loadContacts(); | ||||||
|     return contacts; |     return contacts; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -458,7 +458,6 @@ class Store { | ||||||
| 
 | 
 | ||||||
|   /// Loads all Users in the database to provide a contact list |   /// Loads all Users in the database to provide a contact list | ||||||
|   /// except users who are in the Room with the ID [exceptRoomID]. |   /// except users who are in the Room with the ID [exceptRoomID]. | ||||||
|   @deprecated |  | ||||||
|   Future<List<User>> loadContacts({String exceptRoomID = ""}) async { |   Future<List<User>> loadContacts({String exceptRoomID = ""}) async { | ||||||
|     List<Map<String, dynamic>> res = await db.rawQuery( |     List<Map<String, dynamic>> res = await db.rawQuery( | ||||||
|         "SELECT * FROM Users WHERE matrix_id!=? AND chat_id!=? GROUP BY matrix_id ORDER BY displayname", |         "SELECT * FROM Users WHERE matrix_id!=? AND chat_id!=? GROUP BY matrix_id ORDER BY displayname", | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue