Add support for revealing contacts to the PrivateGroupManager

This also adds two integration tests and improves some small details
This commit is contained in:
Torsten Grote
2016-11-08 22:26:56 -02:00
parent b20c107010
commit ec8982438a
13 changed files with 402 additions and 156 deletions

View File

@@ -12,20 +12,22 @@ import javax.annotation.concurrent.Immutable;
@NotNullByDefault
public class PrivateGroup extends NamedGroup implements Shareable {
private final Author author;
private final Author creator;
public PrivateGroup(Group group, String name, Author author, byte[] salt) {
public PrivateGroup(Group group, String name, Author creator, byte[] salt) {
super(group, name, salt);
this.author = author;
this.creator = creator;
}
public Author getAuthor() {
return author;
public Author getCreator() {
return creator;
}
@Override
public boolean equals(Object o) {
return o instanceof PrivateGroup && super.equals(o);
return o instanceof PrivateGroup &&
creator.equals(((PrivateGroup) o).getCreator()) &&
super.equals(o);
}
}