mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Implement new dbus group interface
This commit is contained in:
parent
b5d4a5000b
commit
997b4f0c3f
15 changed files with 803 additions and 136 deletions
|
@ -12,6 +12,7 @@ import org.asamk.signal.commands.exceptions.UnexpectedErrorException;
|
|||
import org.asamk.signal.commands.exceptions.UserErrorException;
|
||||
import org.asamk.signal.manager.AttachmentInvalidException;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.api.UpdateGroup;
|
||||
import org.asamk.signal.manager.groups.GroupId;
|
||||
import org.asamk.signal.manager.groups.GroupLinkState;
|
||||
import org.asamk.signal.manager.groups.GroupNotFoundException;
|
||||
|
@ -145,21 +146,23 @@ public class UpdateGroupCommand implements JsonRpcLocalCommand {
|
|||
}
|
||||
|
||||
var results = m.updateGroup(groupId,
|
||||
groupName,
|
||||
groupDescription,
|
||||
groupMembers,
|
||||
groupRemoveMembers,
|
||||
groupAdmins,
|
||||
groupRemoveAdmins,
|
||||
groupResetLink,
|
||||
groupLinkState,
|
||||
groupAddMemberPermission,
|
||||
groupEditDetailsPermission,
|
||||
groupAvatar == null ? null : new File(groupAvatar),
|
||||
groupExpiration,
|
||||
groupSendMessagesPermission == null
|
||||
? null
|
||||
: groupSendMessagesPermission == GroupPermission.ONLY_ADMINS);
|
||||
UpdateGroup.newBuilder()
|
||||
.withName(groupName)
|
||||
.withDescription(groupDescription)
|
||||
.withMembers(groupMembers)
|
||||
.withRemoveMembers(groupRemoveMembers)
|
||||
.withAdmins(groupAdmins)
|
||||
.withRemoveAdmins(groupRemoveAdmins)
|
||||
.withResetGroupLink(groupResetLink)
|
||||
.withGroupLinkState(groupLinkState)
|
||||
.withAddMemberPermission(groupAddMemberPermission)
|
||||
.withEditDetailsPermission(groupEditDetailsPermission)
|
||||
.withAvatarFile(groupAvatar == null ? null : new File(groupAvatar))
|
||||
.withExpirationTimer(groupExpiration)
|
||||
.withIsAnnouncementGroup(groupSendMessagesPermission == null
|
||||
? null
|
||||
: groupSendMessagesPermission == GroupPermission.ONLY_ADMINS)
|
||||
.build());
|
||||
if (results != null) {
|
||||
timestamp = results.getTimestamp();
|
||||
ErrorUtils.handleSendMessageResults(results.getResults());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue