Create local state for clients at startup. #279

This commit is contained in:
akwizgran
2016-04-01 15:51:57 +01:00
parent 845d3fa47e
commit 945b5eb1ac
20 changed files with 209 additions and 105 deletions

View File

@@ -16,6 +16,8 @@ import javax.inject.Inject;
class PrivateGroupFactoryImpl implements PrivateGroupFactory {
private static final byte[] LOCAL_GROUP_DESCRIPTOR = new byte[0];
private final GroupFactory groupFactory;
private final ClientHelper clientHelper;
@@ -26,6 +28,11 @@ class PrivateGroupFactoryImpl implements PrivateGroupFactory {
this.clientHelper = clientHelper;
}
@Override
public Group createLocalGroup(ClientId clientId) {
return groupFactory.createGroup(clientId, LOCAL_GROUP_DESCRIPTOR);
}
@Override
public Group createPrivateGroup(ClientId clientId, Contact contact) {
AuthorId local = contact.getLocalAuthorId();