]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/cli/JsonGroupStore.java
Add possibility to send messages via dbus daemon
[signal-cli] / src / main / java / cli / JsonGroupStore.java
index 29f9abfe6e1c1d74f02408b25c042ea013f4fb3b..0fbfdc853f247e84200d2475048a981f6a454ade 100644 (file)
@@ -23,8 +23,12 @@ public class JsonGroupStore {
         groups.put(Base64.encodeBytes(group.groupId), group);
     }
 
-    GroupInfo getGroup(byte[] groupId) {
-        return groups.get(Base64.encodeBytes(groupId));
+    GroupInfo getGroup(byte[] groupId) throws GroupNotFoundException {
+        GroupInfo g = groups.get(Base64.encodeBytes(groupId));
+        if (g == null) {
+            throw new GroupNotFoundException(groupId);
+        }
+        return g;
     }
 
     public static class MapToListSerializer extends JsonSerializer<Map<?, ?>> {