mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-24 01:24:24 +01:00
Add getGroupIds() to DBUS
getGroupIds() returns a list of group ids (byte arrays)
This commit is contained in:
@@ -23,6 +23,8 @@ public interface Signal extends DBusInterface {
|
||||
|
||||
void setContactName(String number, String name);
|
||||
|
||||
List<byte[]> getGroupIds();
|
||||
|
||||
String getGroupName(byte[] groupId);
|
||||
|
||||
List<String> getGroupMembers(byte[] groupId);
|
||||
|
||||
@@ -818,6 +818,16 @@ class Manager implements Signal {
|
||||
save();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<byte[]> getGroupIds() {
|
||||
List<GroupInfo> groups = getGroups();
|
||||
List<byte[]> ids = new ArrayList<byte[]>(groups.size());
|
||||
for (GroupInfo group : groups) {
|
||||
ids.add(group.groupId);
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGroupName(byte[] groupId) {
|
||||
GroupInfo group = getGroup(groupId);
|
||||
|
||||
Reference in New Issue
Block a user