Initialise party info using config data
@@ -35,6 +35,13 @@ public class PartyInfoServiceImpl implements PartyInfoService {
final String advertisedUrl = configService.getServerUri() + "/";
+ final Set<Party> initialParties = configService
+ .getPeers()
+ .stream()
+ .map(Peer::getUrl)
+ .map(Party::new)
+ .collect(toSet());
+
final Set<Recipient> ourKeys = keyManager
.getPublicKeys()
.stream()
@@ -42,7 +49,8 @@ public class PartyInfoServiceImpl implements PartyInfoService {
.map(key -> new Recipient(key, advertisedUrl))
.collect(toSet());
- partyInfoStore.store(new PartyInfo(advertisedUrl, ourKeys, Collections.emptySet()));
+ partyInfoStore.store(new PartyInfo(advertisedUrl, ourKeys, initialParties));
+
}
@Override
