mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Update libsignal-service-java
This commit is contained in:
parent
f445cfb5c1
commit
30690785fd
19 changed files with 71 additions and 42 deletions
|
@ -6,6 +6,8 @@ import net.sourceforge.argparse4j.inf.Subparser;
|
|||
import org.asamk.signal.PlainTextWriterImpl;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
|
||||
import static org.asamk.signal.util.Util.getLegacyIdentifier;
|
||||
|
||||
public class ListContactsCommand implements LocalCommand {
|
||||
|
||||
@Override
|
||||
|
@ -19,7 +21,7 @@ public class ListContactsCommand implements LocalCommand {
|
|||
var contacts = m.getContacts();
|
||||
for (var c : contacts) {
|
||||
writer.println("Number: {} Name: {} Blocked: {}",
|
||||
m.resolveSignalServiceAddress(c.first()).getLegacyIdentifier(),
|
||||
getLegacyIdentifier(m.resolveSignalServiceAddress(c.first())),
|
||||
c.second().getName(),
|
||||
c.second().isBlocked());
|
||||
}
|
||||
|
|
|
@ -12,9 +12,9 @@ import org.asamk.signal.commands.exceptions.CommandException;
|
|||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.storage.groups.GroupInfo;
|
||||
import org.asamk.signal.manager.storage.recipients.RecipientId;
|
||||
import org.asamk.signal.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
|
@ -27,7 +27,7 @@ public class ListGroupsCommand implements LocalCommand {
|
|||
private static Set<String> resolveMembers(Manager m, Set<RecipientId> addresses) {
|
||||
return addresses.stream()
|
||||
.map(m::resolveSignalServiceAddress)
|
||||
.map(SignalServiceAddress::getLegacyIdentifier)
|
||||
.map(Util::getLegacyIdentifier)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue