aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/services/AvatarService.java4
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AvatarService.java b/src/main/java/de/pixart/messenger/services/AvatarService.java
index 7e49f03c6..bd157f442 100644
--- a/src/main/java/de/pixart/messenger/services/AvatarService.java
+++ b/src/main/java/de/pixart/messenger/services/AvatarService.java
@@ -12,6 +12,7 @@ import android.graphics.RectF;
import android.graphics.Typeface;
import android.net.Uri;
import android.support.annotation.Nullable;
+import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.LruCache;
@@ -406,7 +407,8 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded {
}
avatar = mXmppConnectionService.getFileBackend().getAvatar(account.getAvatar(), size);
if (avatar == null) {
- avatar = get(account.getJid().asBareJid().toString(), null, size, false);
+ final String jid = account.getJid().asBareJid().toEscapedString();
+ avatar = get(jid, null, size, false);
}
mXmppConnectionService.getBitmapCache().put(KEY, avatar);
return avatar;
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index f8140504e..c0c3c7dec 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -4224,6 +4224,7 @@ public class XmppConnectionService extends Service {
} else {
request = mIqGenerator.publishNick(displayName);
}
+ mAvatarService.clear(account);
sendIqPacket(account, request, (account1, packet) -> {
if (packet.getType() == IqPacket.TYPE.ERROR) {
Log.d(Config.LOGTAG, account1.getJid().asBareJid() + ": unable to modify nick name " + packet.toString());