X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/fd92a96e1a1d8b5464772667579ee3387a46453b..c487929bcd505a76b4ee445a0765079184865e8b:/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java diff --git a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java index daff69e0..201f0931 100644 --- a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java +++ b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java @@ -705,12 +705,13 @@ class ManagerImpl implements Manager { @Override public void setContactName( - RecipientIdentifier.Single recipient, String name + RecipientIdentifier.Single recipient, String givenName, final String familyName ) throws NotPrimaryDeviceException, UnregisteredRecipientException { if (!account.isPrimaryDevice()) { throw new NotPrimaryDeviceException(); } - context.getContactHelper().setContactName(context.getRecipientHelper().resolveRecipient(recipient), name); + context.getContactHelper() + .setContactName(context.getRecipientHelper().resolveRecipient(recipient), givenName, familyName); } @Override @@ -859,7 +860,8 @@ class ManagerImpl implements Manager { logger.debug("Starting receiving messages"); context.getReceiveHelper().receiveMessagesContinuously((envelope, e) -> { synchronized (messageHandlers) { - Stream.concat(messageHandlers.stream(), weakHandlers.stream()).forEach(h -> { + final var handlers = Stream.concat(messageHandlers.stream(), weakHandlers.stream()).toList(); + handlers.forEach(h -> { try { h.handleMessage(envelope, e); } catch (Throwable ex) { @@ -1047,7 +1049,7 @@ class ManagerImpl implements Manager { IdentityInfo identity; try { identity = account.getIdentityKeyStore() - .getIdentity(context.getRecipientHelper().resolveRecipient(recipient)); + .getIdentityInfo(context.getRecipientHelper().resolveRecipient(recipient)); } catch (UnregisteredRecipientException e) { identity = null; }