X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/7170a68571f2d612f908e5293c15850ba726f35d..78f22c70205bdda075f5db6cd5b77ce0f0f79525:/lib/src/main/java/org/asamk/signal/manager/Manager.java diff --git a/lib/src/main/java/org/asamk/signal/manager/Manager.java b/lib/src/main/java/org/asamk/signal/manager/Manager.java index 28e06bbe..c95ab9b7 100644 --- a/lib/src/main/java/org/asamk/signal/manager/Manager.java +++ b/lib/src/main/java/org/asamk/signal/manager/Manager.java @@ -25,6 +25,7 @@ import org.asamk.signal.manager.groups.GroupIdV1; import org.asamk.signal.manager.groups.GroupInviteLinkUrl; import org.asamk.signal.manager.groups.GroupLinkState; import org.asamk.signal.manager.groups.GroupNotFoundException; +import org.asamk.signal.manager.groups.GroupPermission; import org.asamk.signal.manager.groups.GroupUtils; import org.asamk.signal.manager.groups.NotAGroupMemberException; import org.asamk.signal.manager.helper.GroupV2Helper; @@ -836,6 +837,8 @@ public class Manager implements Closeable { List removeAdmins, boolean resetGroupLink, GroupLinkState groupLinkState, + GroupPermission addMemberPermission, + GroupPermission editDetailsPermission, File avatarFile, Integer expirationTimer ) throws IOException, GroupNotFoundException, AttachmentInvalidException, InvalidNumberException, NotAGroupMemberException { @@ -848,6 +851,8 @@ public class Manager implements Closeable { removeAdmins == null ? null : getSignalServiceAddresses(removeAdmins), resetGroupLink, groupLinkState, + addMemberPermission, + editDetailsPermission, avatarFile, expirationTimer); } @@ -862,8 +867,10 @@ public class Manager implements Closeable { final Set removeAdmins, final boolean resetGroupLink, final GroupLinkState groupLinkState, + final GroupPermission addMemberPermission, + final GroupPermission editDetailsPermission, final File avatarFile, - Integer expirationTimer + final Integer expirationTimer ) throws IOException, GroupNotFoundException, AttachmentInvalidException, NotAGroupMemberException { var group = getGroupForUpdating(groupId); @@ -877,6 +884,8 @@ public class Manager implements Closeable { removeAdmins, resetGroupLink, groupLinkState, + addMemberPermission, + editDetailsPermission, avatarFile, expirationTimer); } @@ -948,6 +957,8 @@ public class Manager implements Closeable { final Set removeAdmins, final boolean resetGroupLink, final GroupLinkState groupLinkState, + final GroupPermission addMemberPermission, + final GroupPermission editDetailsPermission, final File avatarFile, Integer expirationTimer ) throws IOException { @@ -1020,6 +1031,16 @@ public class Manager implements Closeable { result = sendUpdateGroupV2Message(group, groupGroupChangePair.first(), groupGroupChangePair.second()); } + if (addMemberPermission != null) { + var groupGroupChangePair = groupV2Helper.setAddMemberPermission(group, addMemberPermission); + result = sendUpdateGroupV2Message(group, groupGroupChangePair.first(), groupGroupChangePair.second()); + } + + if (editDetailsPermission != null) { + var groupGroupChangePair = groupV2Helper.setEditDetailsPermission(group, editDetailsPermission); + result = sendUpdateGroupV2Message(group, groupGroupChangePair.first(), groupGroupChangePair.second()); + } + if (expirationTimer != null) { var groupGroupChangePair = groupV2Helper.setMessageExpirationTimer(group, expirationTimer); result = sendUpdateGroupV2Message(group, groupGroupChangePair.first(), groupGroupChangePair.second());