From d9d6909c69b57b81380798fabe3a4e2d3d347cb1 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 29 Jun 2018 22:24:48 +0200 Subject: fixed some extended muc info handling. match what ejabberd does --- src/main/java/de/pixart/messenger/entities/Conversation.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/main/java/de/pixart/messenger/entities/Conversation.java') diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 4729eb976..18a20532a 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -920,7 +920,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl return false; } } else { - String prev = this.attributes.getString(key); + final String prev = this.attributes.optString(key, null); this.attributes.put(key, value); return !value.equals(prev); } @@ -940,7 +940,6 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl this.attributes.put(key, array); return true; } catch (JSONException e) { - e.printStackTrace(); return false; } } @@ -948,11 +947,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl public String getAttribute(String key) { synchronized (this.attributes) { - try { - return this.attributes.getString(key); - } catch (JSONException e) { - return null; - } + return this.attributes.optString(key, null); } } -- cgit v1.2.3