]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/Main.java
Prevent NullPointerException when sending sync groups
[signal-cli] / src / main / java / org / asamk / signal / Main.java
index 5e6bfadb6d5ecfd0aeb93b762a44b6f3853b9b3f..14eb985aa59d25e6b6370a427b841eb05ffd66be 100644 (file)
@@ -265,8 +265,6 @@ public class Main {
                             handleAssertionError(e);
                         } catch (DBusExecutionException e) {
                             handleDBusExecutionException(e);
-                        } catch (UntrustedIdentityException e) {
-                            e.printStackTrace();
                         }
                     } else {
                         String messageText = ns.getString("message");
@@ -305,8 +303,6 @@ public class Main {
                             System.exit(1);
                         } catch (DBusExecutionException e) {
                             handleDBusExecutionException(e);
-                        } catch (UntrustedIdentityException e) {
-                            e.printStackTrace();
                         }
                     }
 
@@ -385,8 +381,6 @@ public class Main {
                         handleAssertionError(e);
                     } catch (GroupNotFoundException e) {
                         handleGroupNotFoundException(e);
-                    } catch (UntrustedIdentityException e) {
-                        e.printStackTrace();
                     }
 
                     break;
@@ -419,8 +413,6 @@ public class Main {
                         handleGroupNotFoundException(e);
                     } catch (EncapsulatedExceptions e) {
                         handleEncapsulatedExceptions(e);
-                    } catch (UntrustedIdentityException e) {
-                        e.printStackTrace();
                     }
 
                     break;
@@ -745,7 +737,7 @@ public class Main {
                 SignalServiceGroup groupInfo = message.getGroupInfo().get();
                 System.out.println("Group info:");
                 System.out.println("  Id: " + Base64.encodeBytes(groupInfo.getGroupId()));
-                if (groupInfo.getName().isPresent()) {
+                if (groupInfo.getType() == SignalServiceGroup.Type.UPDATE && groupInfo.getName().isPresent()) {
                     System.out.println("  Name: " + groupInfo.getName().get());
                 } else {
                     GroupInfo group = m.getGroup(groupInfo.getGroupId());