mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-08 16:34:25 +01:00
Implement more methods for DbusManagerImpl
This commit is contained in:
@@ -562,6 +562,7 @@ public class DbusSignalImpl implements Signal {
|
||||
final var memberIdentifiers = getSingleRecipientIdentifiers(members, m.getSelfNumber());
|
||||
if (groupId == null) {
|
||||
final var results = m.createGroup(name, memberIdentifiers, avatar == null ? null : new File(avatar));
|
||||
updateGroups();
|
||||
checkSendMessageResults(results.second().timestamp(), results.second().results());
|
||||
return results.first().serialize();
|
||||
} else {
|
||||
@@ -1152,6 +1153,16 @@ public class DbusSignalImpl implements Signal {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteGroup() throws Error.Failure, Error.LastGroupAdmin {
|
||||
try {
|
||||
m.deleteGroup(groupId);
|
||||
} catch (IOException e) {
|
||||
throw new Error.Failure(e.getMessage());
|
||||
}
|
||||
updateGroups();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMembers(final List<String> recipients) throws Error.Failure {
|
||||
final var memberIdentifiers = getSingleRecipientIdentifiers(recipients, m.getSelfNumber());
|
||||
|
||||
Reference in New Issue
Block a user