Merge branch 'contactlist-enhance-get-from-rooms' into 'master'
[ContactList] Get list from rooms See merge request famedly/famedlysdk!97
This commit is contained in:
commit
95f95ad976
|
@ -298,8 +298,15 @@ class Client {
|
|||
.getRoomByAlias("#famedlyContactDiscovery:${userID.split(":")[1]}");
|
||||
if (contactDiscoveryRoom != null)
|
||||
contacts = await contactDiscoveryRoom.requestParticipants();
|
||||
else
|
||||
contacts = await store?.loadContacts();
|
||||
else {
|
||||
Map<String, User> userMap = {};
|
||||
for (int i = 0; i < roomList.rooms.length; i++) {
|
||||
List<User> roomUsers = roomList.rooms[i].getParticipants();
|
||||
for (int j = 0; j < roomUsers.length; j++)
|
||||
userMap[roomUsers[i].id] = roomUsers[i];
|
||||
}
|
||||
userMap.forEach((String id, User user) => contacts.add(user));
|
||||
}
|
||||
return contacts;
|
||||
}
|
||||
|
||||
|
|
13
pubspec.lock
13
pubspec.lock
|
@ -113,6 +113,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
coverage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: coverage
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.3"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -427,7 +434,7 @@ packages:
|
|||
name: test
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
version: "1.9.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -441,7 +448,7 @@ packages:
|
|||
name: test_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.10"
|
||||
version: "0.2.12"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -462,7 +469,7 @@ packages:
|
|||
name: vm_service
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "1.2.0"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue