Bulk lookup implementation, part 2

- Remote IS bulk lookup
This commit is contained in:
Maxime Dor
2017-04-04 01:11:32 +02:00
parent 9cfa008422
commit d0b9f6774d
7 changed files with 238 additions and 22 deletions

View File

@@ -20,9 +20,11 @@
package io.kamax.mxisd.controller.v1
import io.kamax.mxisd.lookup.ThreePidMapping
class ClientBulkLookupRequest {
private List<List<String>> threepids
private List<List<String>> threepids = new ArrayList<>()
List<List<String>> getThreepids() {
return threepids
@@ -32,4 +34,13 @@ class ClientBulkLookupRequest {
this.threepids = threepids
}
void setMappings(List<ThreePidMapping> mappings) {
for (ThreePidMapping mapping : mappings) {
List<String> threepid = new ArrayList<>()
threepid.add(mapping.getMedium())
threepid.add(mapping.getValue())
threepids.add(threepid)
}
}
}