avoid NullPointerException

This commit is contained in:
adbenitez
2024-11-24 00:33:22 +01:00
parent e234cc864b
commit b968ba67b3
@@ -385,7 +385,7 @@ public class NotificationCenter {
if(dcMsg.getType() == DcMsg.DC_MSG_WEBXDC) {
info = dcMsg.getWebxdcInfo();
} else { // info message, get from parent xdc
info = dcMsg.getParent().getWebxdcInfo();
info = dcMsg.getParent() != null? dcMsg.getParent().getWebxdcInfo() : "";
}
final String name = JsonUtils.optString(info, "name");
String shortLine = name.isEmpty()? text : (name + ": " + text);