Show Responses to Forum Invitations in Private Conversation

Closes #472
This commit is contained in:
Torsten Grote
2016-07-28 19:10:59 -03:00
committed by akwizgran
parent 8bbb2184ff
commit 64b596d0f9
23 changed files with 318 additions and 132 deletions

View File

@@ -9,19 +9,14 @@ public abstract class InvitationMessage extends BaseMessage {
private final SessionId sessionId;
private final ContactId contactId;
private final String message;
private final boolean available;
public InvitationMessage(MessageId id, SessionId sessionId,
ContactId contactId, String message,
boolean available, long time, boolean local, boolean sent,
ContactId contactId, long time, boolean local, boolean sent,
boolean seen, boolean read) {
super(id, time, local, read, sent, seen);
this.sessionId = sessionId;
this.contactId = contactId;
this.message = message;
this.available = available;
}
public SessionId getSessionId() {
@@ -32,12 +27,4 @@ public abstract class InvitationMessage extends BaseMessage {
return contactId;
}
public String getMessage() {
return message;
}
public boolean isAvailable() {
return available;
}
}

View File

@@ -0,0 +1,30 @@
package org.briarproject.api.sharing;
import org.briarproject.api.clients.SessionId;
import org.briarproject.api.contact.ContactId;
import org.briarproject.api.sync.MessageId;
public abstract class InvitationRequest extends InvitationMessage {
private final String message;
private final boolean available;
public InvitationRequest(MessageId id, SessionId sessionId,
ContactId contactId, String message,
boolean available, long time, boolean local, boolean sent,
boolean seen, boolean read) {
super(id, sessionId, contactId, time, local, read, sent, seen);
this.message = message;
this.available = available;
}
public String getMessage() {
return message;
}
public boolean isAvailable() {
return available;
}
}

View File

@@ -0,0 +1,22 @@
package org.briarproject.api.sharing;
import org.briarproject.api.clients.SessionId;
import org.briarproject.api.contact.ContactId;
import org.briarproject.api.sync.MessageId;
public abstract class InvitationResponse extends InvitationMessage {
private final boolean accept;
public InvitationResponse(MessageId id, SessionId sessionId,
ContactId contactId, boolean accept, long time, boolean local,
boolean sent, boolean seen, boolean read) {
super(id, sessionId, contactId, time, local, read, sent, seen);
this.accept = accept;
}
public boolean wasAccepted() {
return accept;
}
}

View File

@@ -23,7 +23,6 @@ public interface SharingMessage {
private final SessionId sessionId;
BaseMessage(GroupId groupId, SessionId sessionId) {
this.groupId = groupId;
this.sessionId = sessionId;
}