mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Only show Introduction Accept Information if success is still possible
This commit is contained in:
@@ -22,7 +22,7 @@ public class IntroductionRequest extends IntroductionResponse {
|
||||
@Nullable String message, boolean answered, boolean exists) {
|
||||
|
||||
super(sessionId, messageId, groupId, role, time, local, sent, seen,
|
||||
read, name, accepted);
|
||||
read, name, accepted, false);
|
||||
|
||||
this.message = message;
|
||||
this.answered = answered;
|
||||
@@ -41,4 +41,11 @@ public class IntroductionRequest extends IntroductionResponse {
|
||||
public boolean contactExists() {
|
||||
return exists;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuccessPossible() {
|
||||
// TODO fix this IntroductionMessage mess
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,16 +12,18 @@ import javax.annotation.concurrent.Immutable;
|
||||
public class IntroductionResponse extends IntroductionMessage {
|
||||
|
||||
private final String name;
|
||||
private final boolean accepted;
|
||||
private final boolean accepted, successPossible;
|
||||
|
||||
public IntroductionResponse(SessionId sessionId, MessageId messageId,
|
||||
GroupId groupId, Role role, long time, boolean local, boolean sent,
|
||||
boolean seen, boolean read, String name, boolean accepted) {
|
||||
boolean seen, boolean read, String name, boolean accepted,
|
||||
boolean successPossible) {
|
||||
super(sessionId, messageId, groupId, role, time, local, sent, seen,
|
||||
read);
|
||||
|
||||
this.name = name;
|
||||
this.accepted = accepted;
|
||||
this.successPossible = successPossible;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -32,4 +34,8 @@ public class IntroductionResponse extends IntroductionMessage {
|
||||
return accepted;
|
||||
}
|
||||
|
||||
public boolean isSuccessPossible() {
|
||||
return successPossible;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user