Optimize fix NPE

This commit is contained in:
Arne 2024-12-17 09:14:05 +01:00
parent 00b8958381
commit fe81e690c9

View file

@ -682,10 +682,8 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
if (this.payloads == null) return null;
for (Element el : this.payloads) {
if (el.getName() != null && el.getNamespace() != null) {
if (el.getName().equals("thread") && el.getNamespace().equals("jabber:client")) {
return el;
}
if ("thread".equals(el.getName()) && "jabber:client".equals(el.getNamespace())) {
return el;
}
}