diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index bdf242292e..6833d4fbd4 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -213,7 +213,6 @@ import org.thoughtcrime.securesms.util.views.Stub; import org.whispersystems.libsignal.InvalidMessageException; import org.whispersystems.libsignal.util.guava.Optional; import org.whispersystems.signalservice.api.SignalServiceMessageSender; -import org.whispersystems.signalservice.api.crypto.UnidentifiedAccessPair; import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage; import org.whispersystems.signalservice.api.push.SignalServiceAddress; import org.whispersystems.signalservice.loki.messaging.LokiThreadFriendRequestStatus; @@ -2718,9 +2717,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity SignalServiceMessageSender messageSender = ApplicationContext.getInstance(this).communicationModule.provideSignalMessageSender(); SignalServiceAddress address = new SignalServiceAddress(contactID); SignalServiceDataMessage message = new SignalServiceDataMessage(System.currentTimeMillis(), ""); - Optional access = Optional.absent(); try { - messageSender.sendMessage(0, address, access, message); // The message ID doesn't matter + messageSender.sendMessage(0, address, Optional.absent(), message); // The message ID doesn't matter } catch (Exception e) { Log.d("Loki", "Failed to send empty message to: " + contactID + "."); } diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java b/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java index e0938ea114..a006c61edf 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java @@ -655,7 +655,7 @@ public class ConversationFragment extends Fragment } if (!loader.hasSent() && !recipient.isSystemContact() && !recipient.isGroupRecipient() && recipient.getRegistered() == RecipientDatabase.RegisteredState.REGISTERED) { - adapter.setHeaderView(unknownSenderView); + // adapter.setHeaderView(unknownSenderView); } else { clearHeaderIfNotTyping(adapter); } diff --git a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index 5d1bc083b7..12e3cfdc6a 100644 --- a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -476,9 +476,18 @@ public class PushDecryptJob extends BaseJob implements InjectableType { sessionStore.archiveAllSessions(content.getSender()); lokiThreadDatabase.setSessionResetStatus(threadId, LokiThreadSessionResetStatus.REQUEST_RECEIVED); - // TODO: Send a background message here Log.d("Loki", "Received a session reset request from: " + content.getSender() + "."); + String contactID = DatabaseFactory.getThreadDatabase(context).getRecipientForThreadId(threadId).getAddress().toString(); + SignalServiceMessageSender messageSender = ApplicationContext.getInstance(context).communicationModule.provideSignalMessageSender(); + SignalServiceAddress address = new SignalServiceAddress(contactID); + SignalServiceDataMessage message = new SignalServiceDataMessage(System.currentTimeMillis(), ""); + try { + messageSender.sendMessage(0, address, Optional.absent(), message); // The message ID doesn't matter + } catch (Exception e) { + Log.d("Loki", "Failed to send empty message to: " + contactID + "."); + } + SecurityEvent.broadcastSecurityUpdateEvent(context); MessageNotifier.updateNotification(context, threadId); }