import org.asamk.signal.util.Util;
import org.whispersystems.signalservice.api.util.InvalidNumberException;
import org.asamk.signal.util.Util;
import org.whispersystems.signalservice.api.util.InvalidNumberException;
- subparser.addArgument("contact")
- .help("Contact number")
- .nargs("*");
- subparser.addArgument("-g", "--group")
- .help("Group ID")
- .nargs("*");
+ subparser.addArgument("contact").help("Contact number").nargs("*");
+ subparser.addArgument("-g", "--group").help("Group ID").nargs("*");
subparser.help("Unblock the given contacts or groups (messages will be received again)");
}
@Override
public int handleCommand(final Namespace ns, final Manager m) {
subparser.help("Unblock the given contacts or groups (messages will be received again)");
}
@Override
public int handleCommand(final Namespace ns, final Manager m) {
for (String contact_number : ns.<String>getList("contact")) {
try {
m.setContactBlocked(contact_number, false);
for (String contact_number : ns.<String>getList("contact")) {
try {
m.setContactBlocked(contact_number, false);
if (ns.<String>getList("group") != null) {
for (String groupIdString : ns.<String>getList("group")) {
try {
if (ns.<String>getList("group") != null) {
for (String groupIdString : ns.<String>getList("group")) {
try {
m.setGroupBlocked(groupId, false);
} catch (GroupIdFormatException | GroupNotFoundException e) {
System.err.println(e.getMessage());
m.setGroupBlocked(groupId, false);
} catch (GroupIdFormatException | GroupNotFoundException e) {
System.err.println(e.getMessage());