Skip to content

Commit

Permalink
v1.3.1 (build 225)
Browse files Browse the repository at this point in the history
  • Loading branch information
finiasz committed Dec 7, 2023
1 parent bffd736 commit 6639add
Show file tree
Hide file tree
Showing 20 changed files with 183 additions and 440 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# Build 225 (1.3.1)
2023-12-07

- Minor fixes

# ~~Build 224 (1.3.1)~~
2023-12-06

- Fix for keycloak contact addition when keycloak is unreachable

# ~~Build 223 (1.3.1)~~
2023-12-05

- Various fixes for keycloak/one-to-one interactions

# ~~Build 222 (1.3.1)~~
2023-12-05

- Fix for invite all group members


# ~~Build 221 (1.3.1)~~
2023-12-04

- Make it possible to invite all group members to private discussions

# Build 220 (1.3)
2023-12-04

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public abstract class Constants {
public static final long WELL_KNOWN_REFRESH_INTERVAL = 3_600_000L * 6; // 6 hours

// download message
public static final long RELIST_DELAY = 30_000; // 30 seconds
public static final long RELIST_DELAY = 10_000; // 10 seconds

// backups
public static final long AUTOBACKUP_MAX_INTERVAL = 86_400_000L; // 1 day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void initialQueueing() {
}

// check all decrypted messages, with attachments, that are not yet marked as listed on the server
InboxMessage[] messagesToMarkAsListedOnServer = InboxMessage.getMessageThatCanBeMarkedAsListedOnServer(fetchManagerSession);
InboxMessage[] messagesToMarkAsListedOnServer = InboxMessage.getMessagesThatCanBeMarkedAsListedOnServer(fetchManagerSession);
for (InboxMessage inboxMessage : messagesToMarkAsListedOnServer) {
fetchManagerSession.markAsListedOnServerListener.messageCanBeMarkedAsListedOnServer(inboxMessage.getOwnedIdentity(), inboxMessage.getUid());
}
Expand Down Expand Up @@ -209,7 +209,7 @@ public void onFinishCallback(Operation operation) {
scheduler.clearFailedCount(identity);

if (listingTruncated) {
// if we listed more than 20 new messages, we might have missed some messages on the server --> trigger a new list in 30 seconds, once messages are processed and deleted from server
// if listing was truncated --> trigger a new list in 10 seconds, once messages are processed and deleted from server
scheduler.schedule(identity, () -> queueNewDownloadMessagesAndListAttachmentsOperation(identity, deviceUid), "DownloadMessagesAndListAttachmentsOperation [relist]", Constants.RELIST_DELAY);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public static InboxMessage[] getMissingExtendedPayloadMessages(FetchManagerSessi
}

// get all messages that have been decrypted, have attachments and are not yet makredAsListedOnServer
public static InboxMessage[] getMessageThatCanBeMarkedAsListedOnServer(FetchManagerSession fetchManagerSession) {
public static InboxMessage[] getMessagesThatCanBeMarkedAsListedOnServer(FetchManagerSession fetchManagerSession) {
try (PreparedStatement statement = fetchManagerSession.session.prepareStatement(
"SELECT m.* FROM " + TABLE_NAME + " AS m " +
" INNER JOIN " + InboxAttachment.TABLE_NAME + " AS a " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ public void doExecute() {
// do nothing for these
break;
}
} else if (serverQuery.getType().getId() == ServerQuery.TypeId.CHECK_KEYCLOAK_REVOCATION_QUERY_ID && returnStatus == ServerMethod.SERVER_CONNECTION_ERROR) {
// if not able to connect to keycloak, assume the user is not revoked. This is required in setups where one of the user's devices does not have access to keycloak
// TODO: once we implement visibility rules in keycloak, this must be removed and replaced by synchronisation messages between owned devices in the protocol
serverResponse = Encoded.of(true);
finished = true;
return;
}
cancel(RFC_NETWORK_ERROR);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ public PropagatedInitialMessage(CoreProtocolMessage coreProtocolMessage, Identit
super(coreProtocolMessage, contactIdentityA, contactIdentityB);
}

@SuppressWarnings("unused")
public PropagatedInitialMessage(ReceivedMessage receivedMessage) throws Exception {
super(receivedMessage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,12 @@ public ConcreteProtocolState executeStep() throws Exception {

UUID dialogUuid = UUID.randomUUID();
{
// create a dialog to allow Alice to abort the protocol
CoreProtocolMessage coreProtocolMessage = buildCoreProtocolMessage(SendChannelInfo.createUserInterfaceChannelInfo(getOwnedIdentity(), DialogType.createOneToOneInvitationSentDialog(receivedMessage.contactIdentity), dialogUuid));
ChannelMessageToSend messageToSend = new DialogInvitationSentMessage(coreProtocolMessage).generateChannelDialogMessageToSend();
protocolManagerSession.channelDelegate.post(protocolManagerSession.session, messageToSend, getPrng());
// create a dialog to allow Alice to abort the protocol (only if Bob is not one to one)
if (!protocolManagerSession.identityDelegate.isIdentityAOneToOneContactOfOwnedIdentity(protocolManagerSession.session, getOwnedIdentity(), receivedMessage.contactIdentity)) {
CoreProtocolMessage coreProtocolMessage = buildCoreProtocolMessage(SendChannelInfo.createUserInterfaceChannelInfo(getOwnedIdentity(), DialogType.createOneToOneInvitationSentDialog(receivedMessage.contactIdentity), dialogUuid));
ChannelMessageToSend messageToSend = new DialogInvitationSentMessage(coreProtocolMessage).generateChannelDialogMessageToSend();
protocolManagerSession.channelDelegate.post(protocolManagerSession.session, messageToSend, getPrng());
}
}

{
Expand Down Expand Up @@ -1030,10 +1032,12 @@ public ConcreteProtocolState executeStep() throws Exception {

UUID dialogUuid = UUID.randomUUID();
{
// create a dialog to allow Alice to abort the protocol
CoreProtocolMessage coreProtocolMessage = buildCoreProtocolMessage(SendChannelInfo.createUserInterfaceChannelInfo(getOwnedIdentity(), DialogType.createOneToOneInvitationSentDialog(receivedMessage.contactIdentity), dialogUuid));
ChannelMessageToSend messageToSend = new DialogInvitationSentMessage(coreProtocolMessage).generateChannelDialogMessageToSend();
protocolManagerSession.channelDelegate.post(protocolManagerSession.session, messageToSend, getPrng());
// create a dialog to allow Alice to abort the protocol (only if Bob is not one to one)
if (!protocolManagerSession.identityDelegate.isIdentityAOneToOneContactOfOwnedIdentity(protocolManagerSession.session, getOwnedIdentity(), receivedMessage.contactIdentity)) {
CoreProtocolMessage coreProtocolMessage = buildCoreProtocolMessage(SendChannelInfo.createUserInterfaceChannelInfo(getOwnedIdentity(), DialogType.createOneToOneInvitationSentDialog(receivedMessage.contactIdentity), dialogUuid));
ChannelMessageToSend messageToSend = new DialogInvitationSentMessage(coreProtocolMessage).generateChannelDialogMessageToSend();
protocolManagerSession.channelDelegate.post(protocolManagerSession.session, messageToSend, getPrng());
}
}

{
Expand Down
1 change: 1 addition & 0 deletions obv_messenger/.idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6639add

Please sign in to comment.