mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Use var instead of explicit types
This commit is contained in:
parent
03c30519b1
commit
de273586b4
77 changed files with 850 additions and 1017 deletions
|
@ -4,7 +4,6 @@ import net.sourceforge.argparse4j.inf.Namespace;
|
|||
import net.sourceforge.argparse4j.inf.Subparser;
|
||||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.groups.GroupId;
|
||||
import org.asamk.signal.manager.groups.GroupIdFormatException;
|
||||
import org.asamk.signal.manager.groups.GroupNotFoundException;
|
||||
import org.asamk.signal.util.Util;
|
||||
|
@ -21,7 +20,7 @@ public class UnblockCommand implements LocalCommand {
|
|||
|
||||
@Override
|
||||
public int handleCommand(final Namespace ns, final Manager m) {
|
||||
for (String contact_number : ns.<String>getList("contact")) {
|
||||
for (var contact_number : ns.<String>getList("contact")) {
|
||||
try {
|
||||
m.setContactBlocked(contact_number, false);
|
||||
} catch (InvalidNumberException e) {
|
||||
|
@ -30,9 +29,9 @@ public class UnblockCommand implements LocalCommand {
|
|||
}
|
||||
|
||||
if (ns.<String>getList("group") != null) {
|
||||
for (String groupIdString : ns.<String>getList("group")) {
|
||||
for (var groupIdString : ns.<String>getList("group")) {
|
||||
try {
|
||||
GroupId groupId = Util.decodeGroupId(groupIdString);
|
||||
var groupId = Util.decodeGroupId(groupIdString);
|
||||
m.setGroupBlocked(groupId, false);
|
||||
} catch (GroupIdFormatException | GroupNotFoundException e) {
|
||||
System.err.println(e.getMessage());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue