mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-01 20:10:39 +00:00
Handle null/non-existant groups better
This commit is contained in:
parent
3a5ba0de48
commit
55e6a7be5b
1 changed files with 12 additions and 2 deletions
|
@ -802,12 +802,22 @@ class Manager implements Signal {
|
|||
|
||||
@Override
|
||||
public String getGroupName(byte[] groupId) {
|
||||
return getGroup(groupId).name;
|
||||
GroupInfo group = getGroup(groupId);
|
||||
if (group == null) {
|
||||
return "";
|
||||
} else {
|
||||
return group.name;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getGroupMembers(byte[] groupId) {
|
||||
return new ArrayList<String>(getGroup(groupId).members);
|
||||
GroupInfo group = getGroup(groupId);
|
||||
if (group == null) {
|
||||
return new ArrayList<String>();
|
||||
} else {
|
||||
return new ArrayList<String>(group.members);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue