mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Implement remove group members
This commit is contained in:
parent
4ebacd0e1f
commit
a91e3f762e
4 changed files with 77 additions and 6 deletions
|
@ -38,6 +38,9 @@ public class UpdateGroupCommand implements DbusCommand, LocalCommand {
|
|||
subparser.addArgument("-d", "--description").help("Specify the new group description.");
|
||||
subparser.addArgument("-a", "--avatar").help("Specify a new group avatar image file");
|
||||
subparser.addArgument("-m", "--member").nargs("*").help("Specify one or more members to add to the group");
|
||||
subparser.addArgument("-r", "--remove-member")
|
||||
.nargs("*")
|
||||
.help("Specify one or more members to remove from the group");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -59,6 +62,8 @@ public class UpdateGroupCommand implements DbusCommand, LocalCommand {
|
|||
|
||||
List<String> groupMembers = ns.getList("member");
|
||||
|
||||
List<String> groupRemoveMembers = ns.getList("remove-member");
|
||||
|
||||
var groupAvatar = ns.getString("avatar");
|
||||
|
||||
try {
|
||||
|
@ -74,6 +79,7 @@ public class UpdateGroupCommand implements DbusCommand, LocalCommand {
|
|||
groupName,
|
||||
groupDescription,
|
||||
groupMembers,
|
||||
groupRemoveMembers,
|
||||
groupAvatar == null ? null : new File(groupAvatar));
|
||||
ErrorUtils.handleTimestampAndSendMessageResults(writer, results.first(), results.second());
|
||||
}
|
||||
|
|
|
@ -344,6 +344,7 @@ public class DbusSignalImpl implements Signal {
|
|||
name,
|
||||
null,
|
||||
members,
|
||||
null,
|
||||
avatar == null ? null : new File(avatar));
|
||||
checkSendMessageResults(results.first(), results.second());
|
||||
return groupId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue