Fix issue where group sent transcripts were not put in proper processing queue.
This commit is contained in:
parent
6c2d21125e
commit
2954c31b5f
1 changed files with 18 additions and 3 deletions
|
@ -124,6 +124,7 @@ import org.whispersystems.signalservice.api.messages.multidevice.ViewOnceOpenMes
|
||||||
import org.whispersystems.signalservice.api.messages.shared.SharedContact;
|
import org.whispersystems.signalservice.api.messages.shared.SharedContact;
|
||||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||||
import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException;
|
import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException;
|
||||||
|
import org.whispersystems.signalservice.internal.push.SignalServiceProtos;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
|
@ -236,10 +237,11 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||||
.setMaxAttempts(Parameters.UNLIMITED);
|
.setMaxAttempts(Parameters.UNLIMITED);
|
||||||
|
|
||||||
if (content != null) {
|
if (content != null) {
|
||||||
if (content.getDataMessage().isPresent() && content.getDataMessage().get().getGroupContext().isPresent()) {
|
SignalServiceGroupContext signalServiceGroupContext = getGroupContextIfPresent(content);
|
||||||
|
|
||||||
|
if (signalServiceGroupContext != null) {
|
||||||
try {
|
try {
|
||||||
SignalServiceGroupContext signalServiceGroupContext = content.getDataMessage().get().getGroupContext().get();
|
GroupId groupId = GroupUtil.idFromGroupContext(signalServiceGroupContext);
|
||||||
GroupId groupId = GroupUtil.idFromGroupContext(signalServiceGroupContext);
|
|
||||||
|
|
||||||
queueName = getQueueName(Recipient.externalPossiblyMigratedGroup(context, groupId).getId());
|
queueName = getQueueName(Recipient.externalPossiblyMigratedGroup(context, groupId).getId());
|
||||||
|
|
||||||
|
@ -446,6 +448,19 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static @Nullable SignalServiceGroupContext getGroupContextIfPresent(@NonNull SignalServiceContent content) {
|
||||||
|
if (content.getDataMessage().isPresent() && content.getDataMessage().get().getGroupContext().isPresent()) {
|
||||||
|
return content.getDataMessage().get().getGroupContext().get();
|
||||||
|
} else if (content.getSyncMessage().isPresent() &&
|
||||||
|
content.getSyncMessage().get().getSent().isPresent() &&
|
||||||
|
content.getSyncMessage().get().getSent().get().getMessage().getGroupContext().isPresent())
|
||||||
|
{
|
||||||
|
return content.getSyncMessage().get().getSent().get().getMessage().getGroupContext().get();
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to update the group to the revision mentioned in the message.
|
* Attempts to update the group to the revision mentioned in the message.
|
||||||
* If the local version is at least the revision in the message it will not query the server.
|
* If the local version is at least the revision in the message it will not query the server.
|
||||||
|
|
Loading…
Add table
Reference in a new issue