mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-18 14:44:19 +01:00
Add workaround for #1045
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user