diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index ef14c3483..2f0609486 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -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; } }