Add in extra check for serviceId in send job.

This commit is contained in:
Greyson Parrelli
2025-08-15 12:36:08 -04:00
committed by Jeffrey Starke
parent 19b3d6d1d3
commit cc43add7af

View File

@@ -267,6 +267,14 @@ public class IndividualSendJob extends PushSendJob {
throw new UndeliverableMessageException(messageRecipient.getId() + " not registered!");
}
if (!messageRecipient.getHasServiceId()) {
messageRecipient = messageRecipient.fresh();
if (!messageRecipient.getHasServiceId()) {
throw new UndeliverableMessageException(messageRecipient.getId() + " has no serviceId!");
}
}
SignalServiceMessageSender messageSender = AppDependencies.getSignalServiceMessageSender();
SignalServiceAddress address = RecipientUtil.toSignalServiceAddress(context, messageRecipient);
List<Attachment> attachments = Stream.of(message.getAttachments()).filterNot(Attachment::isSticker).toList();