mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-04 05:00:39 +00:00
add getBase64GroupIds method for DBus
This commit is contained in:
parent
58d55ef807
commit
908deb43c5
2 changed files with 12 additions and 0 deletions
|
@ -69,6 +69,8 @@ public interface Signal extends DBusInterface {
|
||||||
|
|
||||||
List<byte[]> getGroupIds();
|
List<byte[]> getGroupIds();
|
||||||
|
|
||||||
|
List<String> getBase64GroupIds();
|
||||||
|
|
||||||
String getGroupName(byte[] groupId);
|
String getGroupName(byte[] groupId);
|
||||||
|
|
||||||
List<String> getGroupMembers(byte[] groupId);
|
List<String> getGroupMembers(byte[] groupId);
|
||||||
|
|
|
@ -372,6 +372,16 @@ public class DbusSignalImpl implements Signal {
|
||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getBase64GroupIds() {
|
||||||
|
var groups = m.getGroups();
|
||||||
|
var ids = new ArrayList<String>(groups.size());
|
||||||
|
for (var group : groups) {
|
||||||
|
ids.add(group.getGroupId().toBase64());
|
||||||
|
}
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGroupName(final byte[] groupId) {
|
public String getGroupName(final byte[] groupId) {
|
||||||
var group = m.getGroup(GroupId.unknownVersion(groupId));
|
var group = m.getGroup(GroupId.unknownVersion(groupId));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue