Remember when declines were automatic due to deletion

so they can be shown differently for sender
This commit is contained in:
Torsten Grote
2021-03-01 17:00:16 -03:00
parent a8cff454ec
commit 4d3482e40e
25 changed files with 218 additions and 124 deletions

View File

@@ -15,7 +15,7 @@ public class BlogInvitationResponse extends InvitationResponse {
SessionId sessionId, boolean accept, GroupId shareableId,
long autoDeleteTimer) {
super(id, groupId, time, local, read, sent, seen, sessionId,
accept, shareableId, autoDeleteTimer);
accept, shareableId, autoDeleteTimer, false);
}
@Override

View File

@@ -12,14 +12,16 @@ import javax.annotation.concurrent.Immutable;
public abstract class ConversationResponse extends ConversationMessageHeader {
private final SessionId sessionId;
private final boolean accepted;
private final boolean accepted, isAutoDecline;
public ConversationResponse(MessageId id, GroupId groupId, long time,
boolean local, boolean read, boolean sent, boolean seen,
SessionId sessionId, boolean accepted, long autoDeleteTimer) {
SessionId sessionId, boolean accepted, long autoDeleteTimer,
boolean isAutoDecline) {
super(id, groupId, time, local, read, sent, seen, autoDeleteTimer);
this.sessionId = sessionId;
this.accepted = accepted;
this.isAutoDecline = isAutoDecline;
}
public SessionId getSessionId() {
@@ -30,4 +32,7 @@ public abstract class ConversationResponse extends ConversationMessageHeader {
return accepted;
}
public boolean isAutoDecline() {
return isAutoDecline;
}
}

View File

@@ -18,7 +18,7 @@ public class ForumInvitationResponse extends InvitationResponse {
SessionId sessionId, boolean accept, GroupId shareableId,
long autoDeleteTimer) {
super(id, groupId, time, local, read, sent, seen, sessionId,
accept, shareableId, autoDeleteTimer);
accept, shareableId, autoDeleteTimer, false);
}
@Override

View File

@@ -1,13 +1,13 @@
package org.briarproject.briar.api.introduction;
import org.briarproject.bramble.api.identity.Author;
import org.briarproject.briar.api.identity.AuthorInfo;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.bramble.api.sync.GroupId;
import org.briarproject.bramble.api.sync.MessageId;
import org.briarproject.briar.api.client.SessionId;
import org.briarproject.briar.api.conversation.ConversationMessageVisitor;
import org.briarproject.briar.api.conversation.ConversationResponse;
import org.briarproject.briar.api.identity.AuthorInfo;
import javax.annotation.concurrent.Immutable;
@@ -28,7 +28,7 @@ public class IntroductionResponse extends ConversationResponse {
AuthorInfo introducedAuthorInfo, Role role, boolean canSucceed,
long autoDeleteTimer) {
super(messageId, groupId, time, local, read, sent, seen, sessionId,
accepted, autoDeleteTimer);
accepted, autoDeleteTimer, false);
this.introducedAuthor = author;
this.introducedAuthorInfo = introducedAuthorInfo;
this.ourRole = role;

View File

@@ -16,9 +16,9 @@ public class GroupInvitationResponse extends InvitationResponse {
public GroupInvitationResponse(MessageId id, GroupId groupId, long time,
boolean local, boolean read, boolean sent, boolean seen,
SessionId sessionId, boolean accept, GroupId shareableId,
long autoDeleteTimer) {
long autoDeleteTimer, boolean isAutoDecline) {
super(id, groupId, time, local, read, sent, seen, sessionId,
accept, shareableId, autoDeleteTimer);
accept, shareableId, autoDeleteTimer, isAutoDecline);
}
@Override

View File

@@ -12,9 +12,9 @@ public abstract class InvitationResponse extends ConversationResponse {
public InvitationResponse(MessageId id, GroupId groupId, long time,
boolean local, boolean read, boolean sent, boolean seen,
SessionId sessionId, boolean accepted, GroupId shareableId,
long autoDeleteTimer) {
long autoDeleteTimer, boolean isAutoDecline) {
super(id, groupId, time, local, read, sent, seen, sessionId, accepted,
autoDeleteTimer);
autoDeleteTimer, isAutoDecline);
this.shareableId = shareableId;
}