mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Add GroupId to conversation items
This commit is contained in:
@@ -12,6 +12,7 @@ import org.briarproject.api.introduction.IntroduceeAction;
|
||||
import org.briarproject.api.introduction.IntroduceeProtocolState;
|
||||
import org.briarproject.api.introduction.IntroductionRequest;
|
||||
import org.briarproject.api.clients.SessionId;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
import org.briarproject.api.sync.MessageId;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -343,6 +344,7 @@ public class IntroduceeEngine
|
||||
|
||||
SessionId sessionId = new SessionId(localState.getRaw(SESSION_ID));
|
||||
MessageId messageId = new MessageId(msg.getRaw(MESSAGE_ID));
|
||||
GroupId groupId = new GroupId(msg.getRaw(GROUP_ID));
|
||||
long time = msg.getLong(MESSAGE_TIME);
|
||||
String name = msg.getString(NAME);
|
||||
String message = msg.getOptionalString(MSG);
|
||||
@@ -351,8 +353,9 @@ public class IntroduceeEngine
|
||||
localState.getBoolean(REMOTE_AUTHOR_IS_US);
|
||||
|
||||
IntroductionRequest ir = new IntroductionRequest(sessionId, messageId,
|
||||
ROLE_INTRODUCEE, time, false, false, false, false, authorId,
|
||||
name, false, message, false, exists, introducesOtherIdentity);
|
||||
groupId, ROLE_INTRODUCEE, time, false, false, false, false,
|
||||
authorId, name, false, message, false, exists,
|
||||
introducesOtherIdentity);
|
||||
return new IntroductionRequestReceivedEvent(contactId, ir);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.briarproject.api.introduction.IntroducerAction;
|
||||
import org.briarproject.api.introduction.IntroducerProtocolState;
|
||||
import org.briarproject.api.introduction.IntroductionResponse;
|
||||
import org.briarproject.api.clients.SessionId;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
import org.briarproject.api.sync.MessageId;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -298,14 +299,15 @@ public class IntroducerEngine
|
||||
|
||||
SessionId sessionId = new SessionId(localState.getRaw(SESSION_ID));
|
||||
MessageId messageId = new MessageId(msg.getRaw(MESSAGE_ID));
|
||||
GroupId groupId = new GroupId(msg.getRaw(GROUP_ID));
|
||||
long time = msg.getLong(MESSAGE_TIME);
|
||||
String name = getOtherContact(localState, msg);
|
||||
boolean accept = msg.getBoolean(ACCEPT);
|
||||
|
||||
IntroductionResponse ir =
|
||||
new IntroductionResponse(sessionId, messageId, ROLE_INTRODUCER,
|
||||
time, false, false, false, false, authorId, name,
|
||||
accept);
|
||||
new IntroductionResponse(sessionId, messageId, groupId,
|
||||
ROLE_INTRODUCER, time, false, false, false, false,
|
||||
authorId, name, accept);
|
||||
return new IntroductionResponseReceivedEvent(contactId, ir);
|
||||
}
|
||||
|
||||
|
||||
@@ -415,7 +415,7 @@ class IntroductionManagerImpl extends BdfIncomingMessageHook
|
||||
name = state.getString(NAME);
|
||||
}
|
||||
IntroductionResponse ir = new IntroductionResponse(
|
||||
sessionId, messageId, role, time, local,
|
||||
sessionId, messageId, g, role, time, local,
|
||||
s.isSent(), s.isSeen(), read, authorId, name,
|
||||
accepted);
|
||||
list.add(ir);
|
||||
@@ -445,7 +445,7 @@ class IntroductionManagerImpl extends BdfIncomingMessageHook
|
||||
state.getBoolean(REMOTE_AUTHOR_IS_US);
|
||||
}
|
||||
IntroductionRequest ir = new IntroductionRequest(
|
||||
sessionId, messageId, role, time, local,
|
||||
sessionId, messageId, g, role, time, local,
|
||||
s.isSent(), s.isSeen(), read, authorId, name,
|
||||
accepted, message, answered, exists,
|
||||
introducesOtherIdentity);
|
||||
|
||||
Reference in New Issue
Block a user