diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-12-15 17:29:17 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-12-15 17:29:17 +0100 |
commit | e084266595855033d04950bf2fc1ea4ab244f1fe (patch) | |
tree | 438f7401b1e6343d47f83c84b9633eb60ef6b097 /src/main/java/eu/siacs/conversations/parser | |
parent | 25d8546ae89da97e975e72e9eb2f0608fb38aad5 (diff) |
migrated more jid parsing to use getAttributeAsJid. added error logging
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/AbstractParser.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/AbstractParser.java b/src/main/java/eu/siacs/conversations/parser/AbstractParser.java index c80346b7d..39cbff4f1 100644 --- a/src/main/java/eu/siacs/conversations/parser/AbstractParser.java +++ b/src/main/java/eu/siacs/conversations/parser/AbstractParser.java @@ -53,12 +53,7 @@ public abstract class AbstractParser { protected void updateLastseen(final Element packet, final Account account, final boolean presenceOverwrite) { - Jid from; - try { - from = Jid.fromString(packet.getAttribute("from")).toBareJid(); - } catch (final InvalidJidException e) { - return; - } + Jid from = packet.getAttributeAsJid("from"); String presence = from == null || from.isBareJid() ? "" : from.getResourcepart(); Contact contact = account.getRoster().getContact(from); long timestamp = getTimestamp(packet); |