Add workaround for #1045

This commit is contained in:
AsamK 2022-10-19 17:51:12 +02:00
parent 2e5d8fe561
commit 3f7d8c60b9

View file

@ -144,7 +144,14 @@ public final class IncomingMessageHandler {
} else { } else {
final var senderProfile = context.getProfileHelper().getRecipientProfile(sender); final var senderProfile = context.getProfileHelper().getRecipientProfile(sender);
final var selfProfile = context.getProfileHelper().getSelfProfile(); final var selfProfile = context.getProfileHelper().getSelfProfile();
final var serviceId = ServiceId.parseOrNull(e.getSender()); var serviceId = ServiceId.parseOrNull(e.getSender());
if (serviceId == null) {
// Workaround for libsignal-client issue #492
serviceId = account.getRecipientAddressResolver()
.resolveRecipientAddress(sender)
.serviceId()
.orElse(null);
}
if (serviceId != null) { if (serviceId != null) {
final var isSelf = sender.equals(account.getSelfRecipientId()) final var isSelf = sender.equals(account.getSelfRecipientId())
&& e.getSenderDevice() == account.getDeviceId(); && e.getSenderDevice() == account.getDeviceId();