Files
briar/briar-api/src/org/briarproject/api/introduction/IntroductionResponse.java
Torsten Grote 11e6d64e4d Show relevant decline responses in the conversation
* If the user has already declined, we don't show that the other
  introducee has declined as well. The backend doesn't have that information, so
  this is compatible with the principle of showing what we know.
* If the user has already accepted or hasn't yet responded, we show the
  decline response in the private conversation with the introducer. If
  the user hasn't yet responded, we hide the accept/decline buttons
  in the introduction request message.

Messages an introducee receives in a `FINISHED` state are now being
ignored and deleted.

Closes #295
2016-04-21 11:08:15 -03:00

36 lines
851 B
Java

package org.briarproject.api.introduction;
import org.briarproject.api.identity.AuthorId;
import org.briarproject.api.sync.MessageId;
public class IntroductionResponse extends IntroductionMessage {
private final AuthorId remoteAuthorId;
private final String name;
private final boolean accepted;
public IntroductionResponse(SessionId sessionId, MessageId messageId,
int role, long time, boolean local, boolean sent, boolean seen,
boolean read, AuthorId remoteAuthorId, String name,
boolean accepted) {
super(sessionId, messageId, role, time, local, sent, seen, read);
this.remoteAuthorId = remoteAuthorId;
this.name = name;
this.accepted = accepted;
}
public String getName() {
return name;
}
public boolean wasAccepted() {
return accepted;
}
public AuthorId getRemoteAuthorId() {
return remoteAuthorId;
}
}