mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Add visibility and OPTIONS button to private group join notices
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.briarproject.api.privategroup;
|
||||
|
||||
import org.briarproject.api.event.Event;
|
||||
import org.briarproject.api.identity.AuthorId;
|
||||
import org.briarproject.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
|
||||
@@ -11,11 +12,13 @@ import javax.annotation.concurrent.Immutable;
|
||||
public class ContactRelationshipRevealedEvent extends Event {
|
||||
|
||||
private final GroupId groupId;
|
||||
private final AuthorId memberId;
|
||||
private final Visibility visibility;
|
||||
|
||||
public ContactRelationshipRevealedEvent(GroupId groupId,
|
||||
public ContactRelationshipRevealedEvent(GroupId groupId, AuthorId memberId,
|
||||
Visibility visibility) {
|
||||
this.groupId = groupId;
|
||||
this.memberId = memberId;
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
@@ -23,6 +26,10 @@ public class ContactRelationshipRevealedEvent extends Event {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public AuthorId getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
|
||||
public Visibility getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
@@ -9,15 +9,21 @@ import javax.annotation.concurrent.Immutable;
|
||||
public class JoinMessageHeader extends GroupMessageHeader {
|
||||
|
||||
private final Visibility visibility;
|
||||
private final boolean isCreator;
|
||||
|
||||
public JoinMessageHeader(GroupMessageHeader h, Visibility visibility) {
|
||||
public JoinMessageHeader(GroupMessageHeader h, Visibility visibility, boolean isCreator) {
|
||||
super(h.getGroupId(), h.getId(), h.getParentId(), h.getTimestamp(),
|
||||
h.getAuthor(), h.getAuthorStatus(), h.isRead());
|
||||
this.visibility = visibility;
|
||||
this.isCreator = isCreator;
|
||||
}
|
||||
|
||||
public Visibility getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public boolean isInitial() {
|
||||
return isCreator;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user