Show open button in private conversation after accepting invitations

This commit is contained in:
Torsten Grote
2016-12-13 10:28:25 -02:00
parent d63d15329c
commit 2ef9b8f4b6
23 changed files with 180 additions and 101 deletions

View File

@@ -16,11 +16,12 @@ public class BlogInvitationRequest extends InvitationRequest {
public BlogInvitationRequest(MessageId id, SessionId sessionId,
GroupId groupId, ContactId contactId, String blogAuthorName,
@Nullable String message, boolean available, long time,
boolean local, boolean sent, boolean seen, boolean read) {
@Nullable String message, @Nullable GroupId blogId,
boolean available, long time, boolean local, boolean sent,
boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, message, available, time,
local, sent, seen, read);
super(id, sessionId, groupId, contactId, message, blogId, available,
time, local, sent, seen, read);
this.blogAuthorName = blogAuthorName;
}

View File

@@ -11,11 +11,12 @@ import org.briarproject.briar.api.sharing.InvitationResponse;
public class BlogInvitationResponse extends InvitationResponse {
public BlogInvitationResponse(MessageId id, SessionId sessionId,
GroupId groupId, ContactId contactId, boolean accept, long time,
boolean local, boolean sent, boolean seen, boolean read) {
GroupId groupId, ContactId contactId, GroupId blogId,
boolean accept, long time, boolean local, boolean sent,
boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, accept, time, local, sent,
seen, read);
super(id, sessionId, groupId, contactId, blogId, accept, time, local,
sent, seen, read);
}
}

View File

@@ -17,12 +17,13 @@ public class ForumInvitationRequest extends InvitationRequest {
private final String forumName;
public ForumInvitationRequest(MessageId id, SessionId sessionId,
GroupId groupId, ContactId contactId, String forumName,
@Nullable String message, boolean available, long time,
boolean local, boolean sent, boolean seen, boolean read) {
GroupId groupId, ContactId contactId, GroupId forumId,
String forumName, @Nullable String message, boolean available,
long time, boolean local, boolean sent, boolean seen,
boolean read) {
super(id, sessionId, groupId, contactId, message, available, time,
local, sent, seen, read);
super(id, sessionId, groupId, contactId, message, forumId, available,
time, local, sent, seen, read);
this.forumName = forumName;
}

View File

@@ -14,11 +14,12 @@ import javax.annotation.concurrent.Immutable;
public class ForumInvitationResponse extends InvitationResponse {
public ForumInvitationResponse(MessageId id, SessionId sessionId,
GroupId groupId, ContactId contactId, boolean accept, long time,
boolean local, boolean sent, boolean seen, boolean read) {
GroupId groupId, ContactId contactId, GroupId forumId,
boolean accept, long time, boolean local, boolean sent,
boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, accept, time, local, sent,
seen, read);
super(id, sessionId, groupId, contactId, forumId, accept, time, local,
sent, seen, read);
}
}

View File

@@ -20,10 +20,11 @@ public class GroupInvitationRequest extends InvitationRequest {
public GroupInvitationRequest(MessageId id, SessionId sessionId,
GroupId groupId, ContactId contactId, @Nullable String message,
String groupName, Author creator, boolean available, long time,
boolean local, boolean sent, boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, message, available, time,
local, sent, seen, read);
GroupId privateGroupId, String groupName, Author creator,
boolean available, long time, boolean local, boolean sent,
boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, message, privateGroupId,
available, time, local, sent, seen, read);
this.groupName = groupName;
this.creator = creator;
}

View File

@@ -14,9 +14,10 @@ import javax.annotation.concurrent.Immutable;
public class GroupInvitationResponse extends InvitationResponse {
public GroupInvitationResponse(MessageId id, SessionId sessionId,
GroupId groupId, ContactId contactId, boolean accept, long time,
boolean local, boolean sent, boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, accept, time, local, sent,
seen, read);
GroupId groupId, ContactId contactId, GroupId privateGroupId,
boolean accept, long time, boolean local, boolean sent,
boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, privateGroupId, accept, time,
local, sent, seen, read);
}
}

View File

@@ -7,6 +7,7 @@ import org.briarproject.bramble.api.sync.MessageId;
import org.briarproject.briar.api.client.BaseMessageHeader;
import org.briarproject.briar.api.client.SessionId;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
@Immutable
@@ -15,14 +16,17 @@ public abstract class InvitationMessage extends BaseMessageHeader {
private final SessionId sessionId;
private final ContactId contactId;
@Nullable
private final GroupId invitedGroupId;
public InvitationMessage(MessageId id, SessionId sessionId, GroupId groupId,
ContactId contactId, long time, boolean local, boolean sent,
boolean seen, boolean read) {
ContactId contactId, @Nullable GroupId invitedGroupId, long time,
boolean local, boolean sent, boolean seen, boolean read) {
super(id, groupId, time, local, read, sent, seen);
this.sessionId = sessionId;
this.contactId = contactId;
this.invitedGroupId = invitedGroupId;
}
public SessionId getSessionId() {
@@ -33,4 +37,9 @@ public abstract class InvitationMessage extends BaseMessageHeader {
return contactId;
}
@Nullable
public GroupId getInvitedGroupId() {
return invitedGroupId;
}
}

View File

@@ -18,11 +18,12 @@ public abstract class InvitationRequest extends InvitationMessage {
private final boolean available;
public InvitationRequest(MessageId id, SessionId sessionId, GroupId groupId,
ContactId contactId, @Nullable String message, boolean available,
long time, boolean local, boolean sent, boolean seen,
boolean read) {
ContactId contactId, @Nullable String message,
@Nullable GroupId invitedGroupId, boolean available, long time,
boolean local, boolean sent, boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, time, local, sent, seen, read);
super(id, sessionId, groupId, contactId, invitedGroupId, time, local,
sent, seen, read);
this.message = message;
this.available = available;
}

View File

@@ -6,6 +6,7 @@ import org.briarproject.bramble.api.sync.GroupId;
import org.briarproject.bramble.api.sync.MessageId;
import org.briarproject.briar.api.client.SessionId;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
@Immutable
@@ -15,10 +16,12 @@ public abstract class InvitationResponse extends InvitationMessage {
private final boolean accept;
public InvitationResponse(MessageId id, SessionId sessionId,
GroupId groupId, ContactId contactId, boolean accept, long time,
GroupId groupId, ContactId contactId,
@Nullable GroupId invitedGroupId, boolean accept, long time,
boolean local, boolean sent, boolean seen, boolean read) {
super(id, sessionId, groupId, contactId, time, local, sent, seen, read);
super(id, sessionId, groupId, contactId, invitedGroupId, time, local,
sent, seen, read);
this.accept = accept;
}