X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/a80e18169a9cc68c59c5d7bc6dcdc7b747dfcf37..bb9d44811c511c7acef24e0e9047bdafef9b8f39:/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java diff --git a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java index d64abd0b..05ba6b99 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java @@ -22,6 +22,7 @@ import org.asamk.signal.manager.api.StickerPackInvalidException; import org.asamk.signal.manager.api.StickerPackUrl; import org.asamk.signal.manager.api.TypingAction; import org.asamk.signal.manager.api.UpdateGroup; +import org.asamk.signal.manager.api.UserStatus; import org.asamk.signal.manager.groups.GroupId; import org.asamk.signal.manager.groups.GroupInviteLinkUrl; import org.asamk.signal.manager.groups.GroupNotFoundException; @@ -53,7 +54,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; -import java.util.UUID; import java.util.concurrent.atomic.AtomicLong; import java.util.function.Function; import java.util.function.Supplier; @@ -87,14 +87,16 @@ public class DbusManagerImpl implements Manager { } @Override - public Map> areUsersRegistered(final Set numbers) throws IOException { + public Map getUserStatus(final Set numbers) throws IOException { final var numbersList = new ArrayList<>(numbers); final var registered = signal.isRegistered(numbersList); - final var result = new HashMap>(); + final var result = new HashMap(); for (var i = 0; i < numbersList.size(); i++) { result.put(numbersList.get(i), - new Pair<>(numbersList.get(i), registered.get(i) ? RecipientAddress.UNKNOWN_UUID : null)); + new UserStatus(numbersList.get(i), + registered.get(i) ? RecipientAddress.UNKNOWN_UUID : null, + false)); } return result; }