[ContactList] Define contact list by discoveryRoom
This commit is contained in:
parent
c95f4acecd
commit
8664954f27
|
@ -219,15 +219,14 @@ class Client {
|
||||||
type: HTTPType.POST, action: "/client/r0/join/$id");
|
type: HTTPType.POST, action: "/client/r0/join/$id");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Loads the contact list for this user excluding the users in
|
/// Loads the contact list for this user excluding the user itself.
|
||||||
/// the given room of id [exceptRoomID] and the user itself. Currently the contacts are
|
/// Currently the contacts are found by discovering the contacts of
|
||||||
/// found by discovering the contacts of 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({String exceptRoomID = ""}) async {
|
Future<List<User>> loadFamedlyContacts() async {
|
||||||
Room contactDiscoveryRoom = await store
|
Room contactDiscoveryRoom = await store
|
||||||
.getRoomByAlias("#famedlyContactDiscovery:${userID.split(":")[1]}");
|
.getRoomByAlias("#famedlyContactDiscovery:${userID.split(":")[1]}");
|
||||||
List<User> contacts = await contactDiscoveryRoom.requestParticipants();
|
List<User> contacts = await contactDiscoveryRoom.requestParticipants();
|
||||||
|
|
||||||
return contacts;
|
return contacts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue