diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-12-09 10:30:26 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-12-09 10:30:26 +0100 |
commit | 11e58607c93f152aad82cfe7951355e03274bf47 (patch) | |
tree | 0a6bd88218489a7b3c9c0e011fb67510da83f51e /src/main/java/eu/siacs/conversations/services | |
parent | aea664a0eca8c6f4c2c7113563d7bb5201787c61 (diff) |
when no avatar found show avatar of contact and not the muc user in conferences
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/AvatarService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java index be320b6b..276be10d 100644 --- a/src/main/java/eu/siacs/conversations/services/AvatarService.java +++ b/src/main/java/eu/siacs/conversations/services/AvatarService.java @@ -77,7 +77,12 @@ public class AvatarService { avatar = mXmppConnectionService.getFileBackend().getAvatar(user.getAvatar(), size); } if (avatar == null) { - avatar = get(user.getName(), size, cachedOnly); + Contact contact = user.getContact(); + if (contact != null) { + avatar = get(contact, size, cachedOnly); + } else { + avatar = get(user.getName(), size, cachedOnly); + } } this.mXmppConnectionService.getBitmapCache().put(KEY, avatar); return avatar; |