mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Add getGroupIds() to DBUS
getGroupIds() returns a list of group ids (byte arrays)
This commit is contained in:
parent
86f5c9947b
commit
bdffcffd7a
2 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue